Skip to content

Commit

Permalink
Add reference for MasterUserSecretKMSKeyID (#146)
Browse files Browse the repository at this point in the history
For DBCluster and DBInstance resources, the MasterUserSecretKMSKeyID field can refer to a KMS Key resource.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
jaypipes authored Mar 30, 2023
1 parent a531fd6 commit c337fbc
Show file tree
Hide file tree
Showing 14 changed files with 163 additions and 7 deletions.
6 changes: 3 additions & 3 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2023-03-30T14:52:36Z"
build_date: "2023-03-30T18:50:28Z"
build_hash: fa24753ea8b657d8815ae3eac7accd0958f5f9fb
go_version: go1.19.4
version: v0.25.0
api_directory_checksum: c260842c2919b6d1d7ddc4b1dc40cacea82dc551
api_directory_checksum: 54ea7e387b74b590907eb5136a9a802b0e97a738
api_version: v1alpha1
aws_sdk_go_version: v1.44.232
generator_config_info:
file_checksum: c3a80c129c39b07e24dd80a830d5254626362121
file_checksum: 1c65701c9ae781dcda0fb8c04fed4de60e25a9ef
original_file_name: generator.yaml
last_modification:
reason: API generation
3 changes: 2 additions & 1 deletion apis/v1alpha1/db_cluster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion apis/v1alpha1/db_instance.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ resources:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
MasterUserSecretKmsKeyId:
references:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
DBClusterParameterGroupName:
references:
resource: DBClusterParameterGroup
Expand Down Expand Up @@ -241,6 +246,11 @@ resources:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
MasterUserSecretKmsKeyId:
references:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
DBParameterGroupName:
references:
resource: DBParameterGroup
Expand Down
10 changes: 10 additions & 0 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions config/crd/bases/rds.services.k8s.aws_dbclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,19 @@ spec:
account has a different default KMS key for each Amazon Web Services
Region. \n Valid for: Aurora DB clusters and Multi-AZ DB clusters"
type: string
masterUserSecretKMSKeyRef:
description: "AWSResourceReferenceWrapper provides a wrapper around
*AWSResourceReference type to provide more user friendly syntax
for references using 'from' field Ex: APIIDRef: \n from: name: my-api"
properties:
from:
description: AWSResourceReference provides all the values necessary
to reference another k8s resource for finding the identifier(Id/ARN/Name)
properties:
name:
type: string
type: object
type: object
masterUsername:
description: "The name of the master user for the DB cluster. \n Constraints:
\n * Must be 1 to 16 letters or numbers. \n * First character must
Expand Down
13 changes: 13 additions & 0 deletions config/crd/bases/rds.services.k8s.aws_dbinstances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,19 @@ spec:
account has a different default KMS key for each Amazon Web Services
Region."
type: string
masterUserSecretKMSKeyRef:
description: "AWSResourceReferenceWrapper provides a wrapper around
*AWSResourceReference type to provide more user friendly syntax
for references using 'from' field Ex: APIIDRef: \n from: name: my-api"
properties:
from:
description: AWSResourceReference provides all the values necessary
to reference another k8s resource for finding the identifier(Id/ARN/Name)
properties:
name:
type: string
type: object
type: object
masterUsername:
description: "The name for the master user. \n Amazon Aurora \n Not
applicable. The name for the master user is managed by the DB cluster.
Expand Down
10 changes: 10 additions & 0 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ resources:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
MasterUserSecretKmsKeyId:
references:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
DBClusterParameterGroupName:
references:
resource: DBClusterParameterGroup
Expand Down Expand Up @@ -241,6 +246,11 @@ resources:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
MasterUserSecretKmsKeyId:
references:
resource: Key
service_name: kms
path: Status.ACKResourceMetadata.ARN
DBParameterGroupName:
references:
resource: DBParameterGroup
Expand Down
13 changes: 13 additions & 0 deletions helm/crds/rds.services.k8s.aws_dbclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,19 @@ spec:
account has a different default KMS key for each Amazon Web Services
Region. \n Valid for: Aurora DB clusters and Multi-AZ DB clusters"
type: string
masterUserSecretKMSKeyRef:
description: "AWSResourceReferenceWrapper provides a wrapper around
*AWSResourceReference type to provide more user friendly syntax
for references using 'from' field Ex: APIIDRef: \n from: name: my-api"
properties:
from:
description: AWSResourceReference provides all the values necessary
to reference another k8s resource for finding the identifier(Id/ARN/Name)
properties:
name:
type: string
type: object
type: object
masterUsername:
description: "The name of the master user for the DB cluster. \n Constraints:
\n - Must be 1 to 16 letters or numbers. \n - First character must
Expand Down
13 changes: 13 additions & 0 deletions helm/crds/rds.services.k8s.aws_dbinstances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,19 @@ spec:
account has a different default KMS key for each Amazon Web Services
Region."
type: string
masterUserSecretKMSKeyRef:
description: "AWSResourceReferenceWrapper provides a wrapper around
*AWSResourceReference type to provide more user friendly syntax
for references using 'from' field Ex: APIIDRef: \n from: name: my-api"
properties:
from:
description: AWSResourceReference provides all the values necessary
to reference another k8s resource for finding the identifier(Id/ARN/Name)
properties:
name:
type: string
type: object
type: object
masterUsername:
description: "The name for the master user. \n # Amazon Aurora \n
Not applicable. The name for the master user is managed by the DB
Expand Down
3 changes: 3 additions & 0 deletions pkg/resource/db_cluster/delta.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 34 additions & 1 deletion pkg/resource/db_cluster/references.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/resource/db_instance/delta.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 34 additions & 1 deletion pkg/resource/db_instance/references.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c337fbc

Please sign in to comment.