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

Add aws_iam_account_alias resource #12648

Merged
merged 1 commit into from
Mar 14, 2017
Merged

Conversation

bodgit
Copy link
Contributor

@bodgit bodgit commented Mar 13, 2017

This PR adds a new resource for managing the IAM account alias on AWS, there was a datasource for it added in #10804 but no corresponding resource to manage it:

resource "aws_iam_account_alias" "alias" {
  account_alias = "my-test-alias"
}

It can also import an existing alias if necessary:

$ terraform import aws_iam_account_alias.alias my-test-alias

AWS accounts can only have one alias associated and this is noted in the documentation.

Tests are present and pass:

$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSIAMAccountAlias'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/13 11:32:39 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSIAMAccountAlias -timeout 120m
=== RUN   TestAccAWSIAMAccountAlias_importBasic
--- PASS: TestAccAWSIAMAccountAlias_importBasic (7.29s)
=== RUN   TestAccAWSIAMAccountAlias_basic
--- PASS: TestAccAWSIAMAccountAlias_basic (6.35s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    13.897s

I have to include the following disclaimer to keep my employers legal team happy:

This contribution is provided 'as is' and without any warranty or guarantee of any kind, express or implied, including in relation to its quality, suitability for a particular purpose or non-infringement. To the extent permitted by law, in no event shall the creator of this contribution be liable for any claim, damage or other liability, whether arising in contract, tort or otherwise, arising out of or in connection with this contribution.

@stack72
Copy link
Contributor

stack72 commented Mar 14, 2017

Hi @bodgit

Thanks for the work here - this LGTM :)

% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSIAMAccountAlias'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 15:33:21 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSIAMAccountAlias -timeout 120m
=== RUN   TestAccAWSIAMAccountAlias_importBasic
--- PASS: TestAccAWSIAMAccountAlias_importBasic (32.69s)
=== RUN   TestAccAWSIAMAccountAlias_basic
--- PASS: TestAccAWSIAMAccountAlias_basic (22.10s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	54.824s

@stack72 stack72 merged commit c5ea37c into hashicorp:master Mar 14, 2017
stack72 pushed a commit that referenced this pull request Mar 14, 2017
@ghost
Copy link

ghost commented Apr 15, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants