Skip to content

Commit db43f76

Browse files
authored
Merge pull request #81 from wata727/deprecated_aws_instance_not_specified_iam_profile
Add NOTE to aws_instance_not_specified_iam_profile
2 parents 24f608c + fbcff31 commit db43f76

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Try running TFLint under the directory where Terraform is executed. It detect if
5757
```
5858
$ tflint
5959
template.tf
60-
NOTICE:1 "iam_instance_profile" is not specified. If you want to change it, you need to recreate it
60+
NOTICE:1 "iam_instance_profile" is not specified. If you want to change it, you need to recreate instance. (Only less than Terraform 0.8.8)
6161
ERROR:3 "t1.2xlarge" is invalid instance type.
6262
6363
Result: 2 issues (1 errors , 0 warnings , 1 notices)

detector/aws_instance_not_specified_iam_profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (d *AwsInstanceNotSpecifiedIAMProfileDetector) Detect(file string, item *as
2525
if IsKeyNotFound(item, "iam_instance_profile") {
2626
issue := &issue.Issue{
2727
Type: d.IssueType,
28-
Message: "\"iam_instance_profile\" is not specified. If you want to change it, you need to recreate it",
28+
Message: "\"iam_instance_profile\" is not specified. If you want to change it, you need to recreate instance. (Only less than Terraform 0.8.8)",
2929
Line: item.Pos().Line,
3030
File: file,
3131
}

detector/aws_instance_not_specified_iam_profile_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ resource "aws_instance" "web" {
2424
Issues: []*issue.Issue{
2525
&issue.Issue{
2626
Type: "NOTICE",
27-
Message: "\"iam_instance_profile\" is not specified. If you want to change it, you need to recreate it",
27+
Message: "\"iam_instance_profile\" is not specified. If you want to change it, you need to recreate instance. (Only less than Terraform 0.8.8)",
2828
Line: 2,
2929
File: "test.tf",
3030
},

docs/aws_instance_not_specified_iam_profile.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The following is the execution result of TFLint:
1818
```
1919
$ tflint
2020
template.tf
21-
NOTICE:1 "iam_instance_profile" is not specified. If you want to change it, you need to recreate it
21+
NOTICE:1 "iam_instance_profile" is not specified. If you want to change it, you need to recreate instance. (Only less than Terraform 0.8.8)
2222
2323
Result: 1 issues (0 errors , 0 warnings , 1 notices)
2424
```
@@ -28,5 +28,7 @@ You can select only one IAM profile at instance setup. However, if you do not se
2828

2929
Even if you think that you do not need an IAM profile, we recommend that you specify a dummy. Then you can change the privilege when you need it, so you can escape the recreate of the instance.
3030

31+
NOTE: There is good news that Terraform 0.8.8 and later can change it later. However, it is better to give proper authority from the beginning. If you change it later, there is a possibility that your application may have unexpected effects.
32+
3133
## How To Fix
3234
Please add `iam_instance_profile` attribute.

0 commit comments

Comments
 (0)