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

Remove the Terraform CLI from the provider package and deprecate the relevant provider command-line flags. #619

Merged
merged 1 commit into from Jan 3, 2024

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Jan 3, 2024

Description of your changes

With #592, we have switched to the Terraform plugin SDK-based reconciliation for all the available managed resources in this provider. This PR removes the Terraform CLI and the Terraform Azure provider binaries from the built provider package. We still need to generate the config/schema.json for diff detection purposes and for the code generation pipeline, and we are planning to address the issue of generating the schema.json without the TF CLI in a follow-up PR.

We are also deprecating the following process-forking related command-line arguments:

  • terraform-version
  • terraform-provider-version
  • terraform-native-provider-path
  • terraform-provider-source
  • provider-ttl

What the user will see in the provider logs if she uses any of these flags is something like the following:

warning: Command-line flag "terraform-version" is deprecated and no longer used. It will be removed in a future release. Please remove it from all of your configurations (ControllerConfigs, etc.).
warning: Command-line flag "terraform-provider-source" is deprecated and no longer used. It will be removed in a future release. Please remove it from all of your configurations (ControllerConfigs, etc.).
warning: Command-line flag "terraform-provider-version" is deprecated and no longer used. It will be removed in a future release. Please remove it from all of your configurations (ControllerConfigs, etc.).
warning: Command-line flag "provider-ttl" is deprecated and no longer used. It will be removed in a future release. Please remove it from all of your configurations (ControllerConfigs, etc.).

These logs will be available even if the debug logging is not enabled for the provider.

This PR also bumps the --max-reconcile-rate command-line option's default to 100 to leverage the SDK-based reconciliation runtime's performance improvements.

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Via an uptest run and manually with the package index.docker.io/ulucinar/provider-family-azure:v0.41.0-4e29a7c1ef8506fac221064410b799888fbfd10c.

…relevant provider command-line flags.

- Increase the default value `--max-reconcile-rate` from 10 to 100
- Deprecate the following provider command-line flags:
  - terraform-version
  - terraform-provider-version
  - terraform-native-provider-path
  - terraform-provider-source
  - provider-ttl

Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
@ulucinar
Copy link
Collaborator Author

ulucinar commented Jan 3, 2024

/test-examples="examples/azure/resourcegroup.yaml"

@ulucinar
Copy link
Collaborator Author

ulucinar commented Jan 3, 2024

/test-examples="examples/network/subnet.yaml"

Copy link
Collaborator

@turkenf turkenf left a comment

Choose a reason for hiding this comment

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

Thank you @ulucinar, LGTM.

@ulucinar ulucinar merged commit 29ada63 into crossplane-contrib:main Jan 3, 2024
11 checks passed
@ulucinar ulucinar deleted the remove-tf-cli branch January 3, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants