Skip to content

feat: enable Terraform template-wide variables by default #8334

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

Merged
merged 3 commits into from
Jul 7, 2023

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Jul 6, 2023

Related: coder/terraform-provider-coder#140

Changes:

  • drop logic responsible for processing coder provider flags, including feature_use_managed_variables
  • feature_use_managed_variables is considered to be the only mode. The flag is ignored in the schema, and will be removed eventually.
  • update wording in docs

@mtojek mtojek self-assigned this Jul 6, 2023
@mtojek mtojek marked this pull request as ready for review July 6, 2023 10:53
@mtojek mtojek requested review from mafredri, johnstcn and bpmct July 6, 2023 10:53
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be marked as a breaking change:

feat!: enable Terraform template-wide variables by default

Apart from that, what will happen if someone attempts to use an existing template with the below stanza?

provider "coder" {
  feature_use_managed_variables = "true"
}

Will they be directed to remove feature_use_managed_variables?

@mtojek
Copy link
Member Author

mtojek commented Jul 6, 2023

Apart from that, what will happen if someone attempts to use an existing template with the below stanza?

Nothing happens, the feature flag is just ignored, hence I was not convinced to mark it as a breaking change. Someday in the future, we will update the coder provider schema to block the flag. Then, the coder will complain about an unknown feature flag.

@johnstcn
Copy link
Member

johnstcn commented Jul 6, 2023

Apart from that, what will happen if someone attempts to use an existing template with the below stanza?

Nothing happens, the feature flag is just ignored, hence I was not convinced to mark it as a breaking change. Someday in the future, we will update the coder provider schema to block the flag. Then, the coder will complain about an unknown feature flag.

Got it - that's fine. 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the Coder provider be bumped to 0.10.0? In all of the example templates?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a valid point, but I'd rather do this in a separate PR as more examples will be affected.

Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍🏻

## Managed Terraform variables
## Terraform template-wide variables

> ⚠️ Flag `feature_use_managed_variables` is available until v0.25.0 (Jul 2023) release. After this release, template-wide Terraform variables will be enabled by default.
Copy link
Member

@mafredri mafredri Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this mention the coder provider version as well? (Edit: On second thought, maybe not.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, terraform-provider-coder still accepts the feature_use_managed_variables, so maybe not overcomplicate it :)

@mtojek mtojek merged commit 6468763 into main Jul 7, 2023
@mtojek mtojek deleted the drop-feature-use-managed-variables branch July 7, 2023 09:49
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants