-
Notifications
You must be signed in to change notification settings - Fork 17
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
[BUG] The value supplied for parameter 'instanceProfileName' is not valid #14
Comments
have you double-checked that the instance profile is there? terraform is pretty convinced that
|
So this module currently creates: Plan: 5 to add, 0 to change, 0 to destroy. and we can observe: # aws_iam_instance_profile.this will be created
+ resource "aws_iam_instance_profile" "this" {
+ arn = (known after apply)
+ create_date = (known after apply)
+ id = (known after apply)
+ name = (known after apply)
+ name_prefix = "test-pijp-imagebuilder-instance-profile-"
+ path = "/"
+ role = (known after apply)
+ tags_all = (known after apply)
+ unique_id = (known after apply)
} After applying it we can see it failing with the error message above but after running a destroy we can observe that the resource was created: Plan: 0 to add, 0 to change, 5 to destroy.
# aws_iam_instance_profile.this will be destroyed
- resource "aws_iam_instance_profile" "this" {
- arn = "***" -> null
- create_date = "2021-09-14T14:00:10Z" -> null
- id = "test-pijp-imagebuilder-instance-profile-20210914140010269300000002" -> null
- name = "test-pijp-imagebuilder-instance-profile-20210914140010269300000002" -> null
- name_prefix = "test-pijp-imagebuilder-instance-profile-" -> null
- path = "/" -> null
- role = "test-pijp-imagebuilder-role-20210914140008181200000001" -> null
- tags = {} -> null
- tags_all = {} -> null
- unique_id = "AIPA5JAMNOVNVTPKXPF5O" -> null
} |
Having the same issue. The resource is being created
and I can even see it after deployment running
Do we have a fix on it? Will greatly appreciate any help as we have been stuck for a week? |
@sblack4 I would appreciate if you can assist on this as we have been stuck for weeks. thanks |
This sounds like a race condition. I'm not the only one who has found that IAM can take a few minutes to update Have you tried just waiting a few minutes and doing another |
We've tested this too, even up to an hour we can still observe the same stacktrace being thrown. |
This is where the instance profile gets passed to cloudformation but the "i" in |
The full error after applying: aws_cloudformation_stack.this: Still creating... [1m20s elapsed]
aws_cloudformation_stack.this: Still creating... [1m30s elapsed]
╷
│ Error: error waiting for CloudFormation Stack creation: failed to create CloudFormation stack, rollback requested (ROLLBACK_COMPLETE): ["The following resource(s) failed to create: [distConfig, infraConfig]. Rollback requested by user." "Resource creation cancelled" "Resource handler returned message: \"The value supplied for parameter 'instanceProfileName' is not valid. The provided instance profile does not exist. Please specify a different instance profile and try again. (Service: Imagebuilder, Status Code: 400, Request ID: xxx, Extended Request ID: null)\" (RequestToken: xxx, HandlerErrorCode: GeneralServiceException)"]
│
│ with aws_cloudformation_stack.this,
│ on main.tf line 125, in resource "aws_cloudformation_stack" "this":
│ 125: resource "aws_cloudformation_stack" "this" {
│ Currently does not throw a lot more information. Is there anything else you want me to test? |
Describe the bug
The latest module (v0.5.2) throws the following error:
"The value supplied for parameter 'instanceProfileName' is not valid. The provided instance profile does not exist.
The might be a race condition here as I can see the resource on a destroy:
There is probably something that I'm missing here. I can see the resource and as the name is a simple string, you'd suspect it to be valid.
To Reproduce
terraform apply
Full Stacktrace
The text was updated successfully, but these errors were encountered: