Closed JeffSBailey closed 3 months ago
@JeffSBailey thanks for creating the issue!
Your error implies at least one of these env vars are set (seems like it's ENVIRONMENT_ID
):
All 7 flink_api_key, flink_api_secret, flink_rest_endpoint, organization_id, environment_id, flink_compute_pool_id, flink_principal_id attributes should be set or not set in the provider block at the same time
Is there a way not to set ENVIRONMENT_ID
as environment variable?
It seems we could alternatively rename ENVIRONMENT_ID
to CONFLUENT_ENVIRONMENT_ID
.
It is automatically set by the azure devops pipeline when using an azure devops environment. The only way that I could find around it is to either manually unset the environment variable (not sure if that will cause any issues later) or send in a blank string to the provider. It would be great if there was a CONFLUENT_ prefix required for ENVIRONMENT_ID and ORGANIZATION_ID.
Oh I see, that makes a lot of sense!
We'll apply this suggestion in our next release:
It would be great if there was a CONFLUENT_ prefix required for ENVIRONMENT_ID and ORGANIZATION_ID.
and update this thread once it's released 👍
In a confluent terraform release > 1.61, a change was introduced in the provider config to require that all "7" attributes of the flink provider be set or none be set. The simple terraform below, when run from the shell in an Azure Devops task will result in an error
All 7 flink_api_key, flink_api_secret, flink_rest_endpoint, organization_id, environment_id, flink_compute_pool_id, flink_principal_id attributes should be set or not set in the provider block at the same time
Azure Devops sets an ENVIRONMENT_ID variable that is causing this issue.
Current workarounds:
run
unset ENVIRONMENT_ID
prior to terraform plan.Add to the providers section
environment_id = ""
Note that this makes intellisense mad because environment_id isn't an official property of the confluent provider. It does allow it to go through, however.