dtan4 / terraforming

Export existing AWS resources to Terraform style (tf, tfstate) / No longer actively maintained
http://terraforming.dtan4.net/
MIT License
4.29k stars 659 forks source link

Fix iam instance profile #376

Closed chroju closed 7 years ago

chroju commented 7 years ago

Fix issue #374 .

Because the "roles" argument in aws_iam_instance_profile is deprecated, use "role" instead in tf and tfstate. cf: AWS: aws_iam_instance_profile - Terraform by HashiCorp

In addition, remove the test case with 0 role. In this case, terraform will output the following error.

Error applying plan:

1 error(s) occurred:

* aws_iam_instance_profile.test_profile: 1 error(s) occurred:

* aws_iam_instance_profile.test_profile: Either `role` or `roles` (deprecated) must be specified when creating an IAM Instance Profile
coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 45053e5174c5f0b2d3be11797079162f56c0a759 on chroju:fix_iam_instance_profile into f4e30400ae61381077b6c78b00b02ddc4642a331 on dtan4:master.

dtan4 commented 7 years ago

(mistaken! this comment was moved to https://github.com/dtan4/terraforming/pull/370#issuecomment-338479576)

dtan4 commented 7 years ago

This field change was introduced at https://github.com/hashicorp/terraform/pull/13130 and released at Terraform v0.9.3.

dtan4 commented 7 years ago

LGTM 👍 Thanks ❗️