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

New Resource: aws_cloud9_environment_ec2 #3291

Merged
merged 1 commit into from
Feb 9, 2018
Merged

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Feb 8, 2018

Pending: #3290 (I will rebase after merging)

Test results

=== RUN   TestAccAWSCloud9EnvironmentEc2_basic
--- PASS: TestAccAWSCloud9EnvironmentEc2_basic (167.80s)
=== RUN   TestAccAWSCloud9EnvironmentEc2_importBasic
--- PASS: TestAccAWSCloud9EnvironmentEc2_importBasic (181.27s)
=== RUN   TestAccAWSCloud9EnvironmentEc2_allFields
--- PASS: TestAccAWSCloud9EnvironmentEc2_allFields (347.28s)

@radeksimko radeksimko added new-resource Introduces a new resource. service/cloud9 Issues and PRs that pertain to the cloud9 service. labels Feb 8, 2018
@ghost ghost added size/XXL Managed by automation to categorize the size of a PR. dependencies Used to indicate dependency changes. labels Feb 8, 2018
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/XXL Managed by automation to categorize the size of a PR. dependencies Used to indicate dependency changes. labels Feb 8, 2018
@radeksimko radeksimko changed the title [WIP] New Resource: aws_cloud9_environment_ec2 New Resource: aws_cloud9_environment_ec2 Feb 8, 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.

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"),
Copy link
Contributor

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) {
Copy link
Contributor

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": {
Copy link
Contributor

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,

@ghost ghost added the size/XL Managed by automation to categorize the size of a PR. label Feb 9, 2018
@radeksimko radeksimko merged commit 0997142 into master Feb 9, 2018
@radeksimko radeksimko deleted the f-cloud9-environment branch February 9, 2018 08:40
@radeksimko radeksimko added this to the v1.9.0 milestone Feb 9, 2018
@bflad
Copy link
Contributor

bflad commented Feb 9, 2018

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.

@ghost
Copy link

ghost commented Apr 8, 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 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-resource Introduces a new resource. service/cloud9 Issues and PRs that pertain to the cloud9 service. size/XL Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants