Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rds): fix late init for rds clusterinstance #1326

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apis/rds/v1beta1/zz_clusterinstance_terraformed.go

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

3 changes: 3 additions & 0 deletions config/rds/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ func Configure(p *config.Provider) {
delete(r.References, "engine")
delete(r.References, "engine_version")
r.UseAsync = true
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{"engine_version", "db_parameter_group_name", "preferred_backup_window"},
}
})
p.AddResourceConfigurator("aws_db_instance", func(r *config.Resource) {
r.References["db_subnet_group_name"] = config.Reference{
Expand Down
19 changes: 10 additions & 9 deletions examples/rds/v1beta1/clusterinstance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ spec:
testing.upbound.io/example-name: example-ci
engine: aurora-postgresql
instanceClass: db.r5.large
dbParameterGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example-ci

---

Expand All @@ -36,6 +33,11 @@ spec:
forProvider:
region: us-west-1
engine: aurora-postgresql
engineVersion: "15.6"
dbClusterParameterGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example-ci
preferredBackupWindow: "04:00-05:00"
masterUsername: cpadmin
masterPasswordSecretRef:
name: sample-cluster-password
Expand All @@ -60,19 +62,18 @@ stringData:
---

apiVersion: rds.aws.upbound.io/v1beta1
kind: ParameterGroup
kind: ClusterParameterGroup
metadata:
annotations:
meta.upbound.io/example-id: rds/v1beta1/clusterinstance
labels:
testing.upbound.io/example-name: example-ci
name: example-parametergroup-ci
name: example-clusterparametergroup-ci
spec:
forProvider:
region: us-west-1
description: RDS default cluster parameter group
family: aurora-postgresql15
description: example
parameter:
- name: application_name
value: "example"
applyMethod: immediate
- name: apg_plan_mgmt.capture_plan_baselines
value: "manual"
Loading