terraforming icon indicating copy to clipboard operation
terraforming copied to clipboard

[DEPRECATED] Use `role` instead. Only a single role can be passed to an IAM Instance Profile

Open zhujian0805 opened this issue 7 years ago • 5 comments

There are warnings related to your configuration. If no errors occurred, Terraform will continue despite these warnings. It is a good idea to resolve these warnings in the near future.

Warnings:

  • aws_iam_instance_profile.aws-elasticbeanstalk-ec2-role: "roles": [DEPRECATED] Use role instead. Only a single role can be passed to an IAM Instance Profile

zhujian0805 avatar May 29 '17 04:05 zhujian0805

Thanks!

This deprecation was introduced at v0.9.3. In addition, role field was introduced at the same time. If I replace roles to role now, errors will be occured at some environments where using Terraform v0.9.2 or below.

If roles field was removed (maybe next minor release v0.10?), I'll do replace.

dtan4 avatar Jun 02 '17 00:06 dtan4

Thanks! Shall i close this issue or just keep it open until roles is removed in the next release?

zhujian0805 avatar Jun 03 '17 09:06 zhujian0805

Please keep this open. After I remove roles field, I'll close by myself.

dtan4 avatar Jun 05 '17 06:06 dtan4

@dtan4 my terraform version: Terraform v0.11.1

  • provider.aws v1.7.0 Warning: aws_iam_instance_profile.swarm_cluster_profile: "roles": [DEPRECATED] Use role instead. Only a single role can be passed to an IAM Instance Profile

i am still facing same issue: after changing roles to role, error changed.

Error: aws_iam_instance_profile.swarm_cluster_profile: role must be a single value, not a list

Laxman-SM avatar Jan 18 '18 23:01 Laxman-SM

@Laxman-SM you will need to remove the square brackets [] from around the value. For instance, you need to go from this

roles = ["${aws_iam_role.cluster_instance_role.name}"]

to this

role = "${aws_iam_role.cluster_instance_role.name}"

@dtan4 can this issue be closed yet?

tillydray avatar Sep 28 '18 14:09 tillydray