You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have multiple Amazon Kafka (MSK) clusters in our non-production AWS tenancy - one for each non-prod "environment" we manage - and would like to use this provider to provision topics into them.
Currently we have a backend config file for each environment - e.g. dev-backend.tfvars, test-backend.tfvars etc - and these use the AWS S3 backend to manage state. Then we have per-environment vars - e.g. dev.tfvars, test.tfvars etc - that contain the topics to provision.
So for example, I'd like to be able to specify our "dev" environment kafka bootstrap servers in the dev.tfvars file mentioned above.
However because the bootstrap servers are part of the provider configuration it appears we can't specify the bootstrap servers in per-environment tfvars files.
And it isn't clear to me how else I can possibly "parameterise" the provider configuration such that I can provision the topics in a single environment via a terraform apply -var-file dev.tfvars call.
Furthermore, if we wanted to create a terraform "module" to abstract away the topic creation, looking at the module provider docs because the bootstrap servers are part of the provider block, it seems to me that I would have to create a separate module for each "environment" - which kind of defeats the purpose of modules.
Is my understanding correct? If not can you point to what terraform mechanism can be used to achieve the above?
The text was updated successfully, but these errors were encountered:
Hi,
We have multiple Amazon Kafka (MSK) clusters in our non-production AWS tenancy - one for each non-prod "environment" we manage - and would like to use this provider to provision topics into them.
Currently we have a backend config file for each environment - e.g.
dev-backend.tfvars
,test-backend.tfvars
etc - and these use the AWS S3 backend to manage state. Then we have per-environment vars - e.g.dev.tfvars
,test.tfvars
etc - that contain the topics to provision.So for example, I'd like to be able to specify our "dev" environment kafka bootstrap servers in the
dev.tfvars
file mentioned above.However because the bootstrap servers are part of the provider configuration it appears we can't specify the bootstrap servers in per-environment tfvars files.
And it isn't clear to me how else I can possibly "parameterise" the provider configuration such that I can provision the topics in a single environment via a
terraform apply -var-file dev.tfvars
call.Furthermore, if we wanted to create a terraform "module" to abstract away the topic creation, looking at the module provider docs because the bootstrap servers are part of the provider block, it seems to me that I would have to create a separate module for each "environment" - which kind of defeats the purpose of modules.
Is my understanding correct? If not can you point to what terraform mechanism can be used to achieve the above?
The text was updated successfully, but these errors were encountered: