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

add ReattachOption #78

Merged
merged 2 commits into from
Sep 9, 2020
Merged

add ReattachOption #78

merged 2 commits into from
Sep 9, 2020

Conversation

kmoe
Copy link
Member

@kmoe kmoe commented Sep 7, 2020

Binary testing reattach functionality requires the TF_PROVIDERS_REATTACH env var to be present in the environment in which the Terraform CLI is run. In normal usage, such as in terraform-plugin-test, the value of this env var will change during the lifetime of a *Terraform. We therefore provide a way of setting the reattach info string on every relevant Terraform CLI command as if it is an option.

tfexec/options.go Outdated Show resolved Hide resolved
tfexec/terraform.go Outdated Show resolved Hide resolved
@paultyng
Copy link
Contributor

paultyng commented Sep 8, 2020

Some comments inline, also need a compatibility check for 0.12.26 or greater

@paddycarver
Copy link
Contributor

I agree with all @paultyng's comments, and have no other comments of my own to add. 👍

tfexec/cmd.go Outdated Show resolved Hide resolved
tfexec/cmd.go Outdated Show resolved Hide resolved
tfexec/options.go Outdated Show resolved Hide resolved
tfexec/terraform.go Outdated Show resolved Hide resolved
tfexec/terraform.go Outdated Show resolved Hide resolved
Copy link
Contributor

@paultyng paultyng left a comment

Choose a reason for hiding this comment

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

minor comments inline, otherwise LGTM

@kmoe kmoe merged commit 4e81ecc into master Sep 9, 2020
@kmoe kmoe deleted the reattach-env branch September 9, 2020 18:58
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.

3 participants