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

provider/aws: Support refresh of EC2 instance user_data. #6736

Merged
merged 1 commit into from
Oct 12, 2016

Conversation

modax
Copy link
Contributor

@modax modax commented May 18, 2016

Make sure to hash base64 decoded value since user_data might be given
either raw bytes or base64 value.

This helps #1887 somewhat
as now you can:

  1. Update user_data in AWS console.
  2. Respectively update user_data in terraform code.
  3. Just refresh terraform state and it should not report any changes.

Make sure to hash base64 decoded value since user_data might be given
either raw bytes or base64 value.

This helps hashicorp#1887 somewhat
as now you can:

1) Update user_data in AWS console.
2) Respectively update user_data in terraform code.
3) Just refresh terraform state and it should not report any changes.
@cheungpat
Copy link

Is there any problem with this PR?

@catsby
Copy link
Contributor

catsby commented Oct 12, 2016

LGTM! Thanks!

TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSInstance -timeout 120m
=== RUN   TestAccAWSInstance_importBasic
--- PASS: TestAccAWSInstance_importBasic (92.81s)
=== RUN   TestAccAWSInstance_basic
--- PASS: TestAccAWSInstance_basic (112.48s)
=== RUN   TestAccAWSInstance_GP2IopsDevice
--- PASS: TestAccAWSInstance_GP2IopsDevice (178.98s)
=== RUN   TestAccAWSInstance_blockDevices
--- PASS: TestAccAWSInstance_blockDevices (196.03s)
=== RUN   TestAccAWSInstance_sourceDestCheck
--- PASS: TestAccAWSInstance_sourceDestCheck (136.46s)
=== RUN   TestAccAWSInstance_disableApiTermination
--- PASS: TestAccAWSInstance_disableApiTermination (116.23s)
=== RUN   TestAccAWSInstance_vpc
--- PASS: TestAccAWSInstance_vpc (92.03s)
=== RUN   TestAccAWSInstance_multipleRegions
--- PASS: TestAccAWSInstance_multipleRegions (201.51s)
=== RUN   TestAccAWSInstance_NetworkInstanceSecurityGroups
--- PASS: TestAccAWSInstance_NetworkInstanceSecurityGroups (127.92s)
=== RUN   TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs
--- PASS: TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs (118.29s)
=== RUN   TestAccAWSInstance_tags
--- PASS: TestAccAWSInstance_tags (119.58s)
=== RUN   TestAccAWSInstance_privateIP
--- PASS: TestAccAWSInstance_privateIP (229.65s)
=== RUN   TestAccAWSInstance_associatePublicIPAndPrivateIP
--- PASS: TestAccAWSInstance_associatePublicIPAndPrivateIP (228.37s)
=== RUN   TestAccAWSInstance_keyPairCheck
--- PASS: TestAccAWSInstance_keyPairCheck (93.42s)
=== RUN   TestAccAWSInstance_rootBlockDeviceMismatch
--- PASS: TestAccAWSInstance_rootBlockDeviceMismatch (195.81s)
=== RUN   TestAccAWSInstance_forceNewAndTagsDrift
--- PASS: TestAccAWSInstance_forceNewAndTagsDrift (314.92s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    2554.528s
Test:

@catsby catsby merged commit 7385fa9 into hashicorp:master Oct 12, 2016
@thanura1988
Copy link

Can you please explain how this is done

Make sure to hash base64 decoded value since user_data might be given
either raw bytes or base64 value.

is it required to convert our text script to base64 and save it in Aws console?
using something like this

@ghost
Copy link

ghost commented Mar 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants