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

resource/spot_fleet_request: validate arn for argument iam_fleet_role #3431

Merged

Conversation

loivis
Copy link
Contributor

@loivis loivis commented Feb 18, 2018

Quick fix #3430

I think it's sufficient to just validate format of arn, which the minimal change required for #3430 .

@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Feb 18, 2018
@radeksimko radeksimko added enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. labels Feb 19, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Since the API documentation is not explicit about this, I have also verified that passing just the role name returns this API error, so ARN is required format:

make testacc TEST=./aws TESTARGS='-run=TestAccAWSSpotFleetRequest_instanceInterruptionBehavior'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSSpotFleetRequest_instanceInterruptionBehavior -timeout 120m
=== RUN   TestAccAWSSpotFleetRequest_instanceInterruptionBehavior
--- FAIL: TestAccAWSSpotFleetRequest_instanceInterruptionBehavior (608.35s)
	testing.go:513: Step 0 error: Error applying: 1 error(s) occurred:

		* aws_spot_fleet_request.foo: 1 error(s) occurred:

		* aws_spot_fleet_request.foo: Error requesting spot fleet: [WARN] Error creating Spot fleet request, retrying: InvalidSpotFleetRequestConfig: Parameter: SpotFleetRequestConfig.IamFleetRole is invalid.test-role-lumds8e1i9 does not start with arn
			status code: 400, request id: 48b3e0db-7526-4d92-9275-e95d2991fcfb
FAIL
exit status 1
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	608.393s

@bflad bflad added this to the v1.10.0 milestone Feb 19, 2018
@bflad bflad merged commit 86ee97c into hashicorp:master Feb 19, 2018
@loivis loivis deleted the 3430-spot-fleet-request-validate-iam-role branch February 19, 2018 15:32
bflad added a commit that referenced this pull request Feb 19, 2018
@bflad
Copy link
Contributor

bflad commented Feb 27, 2018

This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 7, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_spot_fleet_request keeps waiting for creation even if invalid iam_fleet_role
3 participants