Commit Graph

10 Commits

Author SHA1 Message Date
Jake Champlin 3cd125a901
provider/aws: Add import to codecommit_repository
Adds import capability to the `aws_codecommit_repository` resource.

Also fixes an issue in the Read function where both `description` and `resource_name` attributes weren't being updated and set in the Schema.

Fixes: #13559

```
$ make testacc TEST=./builtin/providers/aws TESTARGS="-run=TestAccAWSCodeCommitRepository"
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/12 10:14:44 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCodeCommitRepository -timeout 120m
=== RUN   TestAccAWSCodeCommitRepository_importBasic
--- PASS: TestAccAWSCodeCommitRepository_importBasic (16.11s)
=== RUN   TestAccAWSCodeCommitRepository_basic
--- PASS: TestAccAWSCodeCommitRepository_basic (14.97s)
=== RUN   TestAccAWSCodeCommitRepository_withChanges
--- PASS: TestAccAWSCodeCommitRepository_withChanges (26.71s)
=== RUN   TestAccAWSCodeCommitRepository_create_default_branch
--- PASS: TestAccAWSCodeCommitRepository_create_default_branch (14.34s)
=== RUN   TestAccAWSCodeCommitRepository_create_and_update_default_branch
--- PASS: TestAccAWSCodeCommitRepository_create_and_update_default_branch (27.90s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    100.071s
```
2017-04-12 10:18:49 -04:00
Anshul Sharma 7150bafb84 Remove Region Condition From CodeCommit Repo Resource (#8778) 2016-09-12 07:30:46 +01:00
Radek Simko 302982c335 provider/aws: Remove unsafe ptr dereferencing [A-C]* (#8519) 2016-08-28 19:25:30 +01:00
Hector Rivas Gandara 0c49b17f72 provider/aws: codecommit check default_branch before update
In AWS codecommit the default branch must have a value unless there are
no branches created, in which case it is not possible to set it to any value.

We query the existing branches and do not update the default branch
if there are none defined remotely.

This solves the issue of the initial creation of the repository with a
resource with `default_branch` defined.
2016-03-30 16:40:41 +01:00
Hector Rivas Gandara 1afd3a53b2 provider/aws: codecommit set default_branch only if defined
Do not try to update or reaad the AWS codecommit repository default branch if
the resource definition is not set it or is an empty string.

Fixes #5641
2016-03-30 16:40:37 +01:00
Paul Hinze 5b78a9f635 provider/aws: var name tweak
as discussed in #3274 w/ @stack72
2015-10-30 17:50:57 -05:00
stack72 14604e432e Added the documentation for the CodeCommit repository 2015-10-30 21:39:16 +00:00
stack72 2ad006ab50 Currently, AWS CodeCommit is only available in us-east-1, therefore we
need to error out early if the region is anything other than this

Also added a test that will show that changes get applied on subsequent
runs
2015-10-30 21:39:16 +00:00
stack72 d9fd77c141 Finishing the last of the CodeCommit Repository resource. Also started to add some tests. The trouble for me right now is that CodeCommit is only in US-East-1 so I need to guard against that right now 2015-10-30 21:39:16 +00:00
stack72 89ce6f7c83 Started the work for the AWS CodeCommit Repository resource
Starting to add the skeleton for the creation and update of a repository
2015-10-30 21:39:04 +00:00