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

Doc update: aws_codecommit_repository does not support default_branch #8099

Closed
wants to merge 1 commit into from

Conversation

jwatson0
Copy link

The website docs list 'default_branch' as an attribute of aws_codecommit_repository, but this attribute is not in the current code.

module.codecommit.output.default_branch: Resource
'aws_codecommit_repository.repo' does not have attribute 
'default_branch' for variable 'aws_codecommit_repository.repo.default_branch'

See also: https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/data_source_aws_codecommit_repository.go

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

module.codecommit.output.default_branch: Resource 'aws_codecommit_repository.repo' does not have attribute 'default_branch' for variable 'aws_codecommit_repository.repo.default_branch'

See also: https://github.com/terraform-providers/terraform-provider-aws/blob/master/aws/data_source_aws_codecommit_repository.go
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/codecommit Issues and PRs that pertain to the codecommit service. documentation Introduces or discusses updates to documentation. labels Mar 27, 2019
@bflad
Copy link
Contributor

bflad commented Mar 28, 2019

Hi @jwatson0 👋 Thanks for submitting this. The code you link to is for the data source while the change is for the resource documentation. The resource does indeed support the default_branch argument:

https://github.com/terraform-providers/terraform-provider-aws/blob/964e6be60f53e594f833e46c2d993e2cd77028f7/aws/resource_aws_codecommit_repository.go#L57-L60

And is acceptance tested here:

https://github.com/terraform-providers/terraform-provider-aws/blob/964e6be60f53e594f833e46c2d993e2cd77028f7/aws/resource_aws_codecommit_repository_test.go#L80-L124

What you might be seeing instead is that the resource is only making the default_branch attribute available if it was specified, which may be an implementation bug:

https://github.com/terraform-providers/terraform-provider-aws/blob/964e6be60f53e594f833e46c2d993e2cd77028f7/aws/resource_aws_codecommit_repository.go#L132-L136

And noted in the testing here with the ...NoResourceAttr:

https://github.com/terraform-providers/terraform-provider-aws/blob/964e6be60f53e594f833e46c2d993e2cd77028f7/aws/resource_aws_codecommit_repository_test.go#L110-L111

So that said, we likely cannot accept this change since the argument is valid, but indeed the behavior is currently confusing and probably warrants a resource code fix.

@aeschright aeschright requested a review from a team June 26, 2019 00:50
@bflad
Copy link
Contributor

bflad commented Jun 26, 2019

Closing given the previous comment.

@bflad bflad closed this Jun 26, 2019
@ghost
Copy link

ghost commented Nov 3, 2019

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 Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. service/codecommit Issues and PRs that pertain to the codecommit 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.

2 participants