k8s: fix MySQL-TLS schema references in deploy/job/cronjob#238
Open
TobiKr wants to merge 1 commit into
Open
Conversation
The database.tls input variable schema (k8s/variables.tf) declares six
attributes: enabled, config, server_name, ca_cert_key, cert_key, key_key.
However k8s/deploy.tf, k8s/job.tf, and k8s/cronjob.tf reference two
attributes that do not exist on that type:
* local.database.tls.cert_secret_key -> should be cert_key
* local.database.tls.secret_name -> not on tls; the MySQL secret
is local.database.secret_name
These are inside dynamic blocks gated on local.database.tls.enabled,
but Terraform type-checks the expressions during planning regardless,
so any consumer setting database.tls.enabled = true (or even leaving
TLS off, since the type-check is static) hits:
Error: Unsupported attribute
This object does not have an attribute named "cert_secret_key".
Error: Unsupported attribute
This object does not have an attribute named "secret_name".
Align all three files with the variable schema, matching the pattern
already used for the password env var (which correctly reads
local.database.secret_name).
Contributor
|
@TobiKr Thank you for your contribution! We'll schedule the review of your proposed changes for next sprint. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The database.tls input variable schema (k8s/variables.tf) declares six
attributes: enabled, config, server_name, ca_cert_key, cert_key, key_key.
However k8s/deploy.tf, k8s/job.tf, and k8s/cronjob.tf reference two
attributes that do not exist on that type:
is local.database.secret_name
These are inside dynamic blocks gated on local.database.tls.enabled,
but Terraform type-checks the expressions during planning regardless,
so any consumer setting database.tls.enabled = true (or even leaving
TLS off, since the type-check is static) hits:
Error: Unsupported attribute
This object does not have an attribute named "cert_secret_key".
Error: Unsupported attribute
This object does not have an attribute named "secret_name".
Align all three files with the variable schema, matching the pattern
already used for the password env var (which correctly reads
local.database.secret_name).