-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
New Resource: aws_cloud9_environment_ec2 #3291
Conversation
56c637e
to
6081204
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!! Some minor nitpicks but LGTM!
make testacc TEST=./aws TESTARGS='-run=TestAccAWSCloud9EnvironmentEc2'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSCloud9EnvironmentEc2 -timeout 120m
=== RUN TestAccAWSCloud9EnvironmentEc2_basic
--- PASS: TestAccAWSCloud9EnvironmentEc2_basic (191.36s)
=== RUN TestAccAWSCloud9EnvironmentEc2_allFields
--- PASS: TestAccAWSCloud9EnvironmentEc2_allFields (375.74s)
=== RUN TestAccAWSCloud9EnvironmentEc2_importBasic
--- PASS: TestAccAWSCloud9EnvironmentEc2_importBasic (187.04s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 754.193s
testAccCheckAWSCloud9EnvironmentEc2Exists(resourceName, &conf), | ||
resource.TestCheckResourceAttr(resourceName, "instance_type", "t2.micro"), | ||
resource.TestCheckResourceAttr(resourceName, "name", envName), | ||
resource.TestCheckResourceAttrSet(resourceName, "arn"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick: We can regexp match the ARN according to the ARN Cloud9 documentation:
resource.TestMatchResourceAttr(resourceName, "arn", regexp.MustCompile(fmt.Sprintf("^arn:[^:]+:cloud9:[^:]+:[^:]+:environment:.+$"))
}) | ||
} | ||
|
||
func TestAccAWSCloud9EnvironmentEc2_allFields(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: This test is labelled _allFields
however its not testing owner_arn
Type: schema.TypeString, | ||
Optional: true, | ||
}, | ||
"owner_arn": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: We can add validation for this attribute via: ValidateFunc: validateArn,
6081204
to
81419b5
Compare
This has been released in terraform-provider-aws version 1.9.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Pending: #3290 (I will rebase after merging)Test results