-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/aws: CodeCommit - Currently only in us-east-1 #3274
Conversation
Starting to add the skeleton for the creation and update of a repository
…d 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
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
586cbdc
to
14604e4
Compare
@radeksimko @phinze I have just rebased this PR. Technically, this is now complete as CodeCommit is only available in us-east-1 right now Would love to know your thoughts |
@@ -213,6 +215,9 @@ func (c *Config) Client() (interface{}, error) { | |||
|
|||
log.Println("[INFO] Initializing CodeDeploy Connection") | |||
client.codedeployconn = codedeploy.New(sess) | |||
|
|||
log.Println("[INFO] Initializing CodeCommit SDK connection") | |||
client.codecommitconn = codecommit.New(awsConfig) |
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.
Hm - did codecommit not get the new session.Session refactoring that the rest of the connections did this week? I'm surprised this builds!
I'd expect the line here to need usEast1Sess
as the argument.
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.
you are 100% correct. I have just updated this commit. It should indeed be the sess work
I'm also surprised this built
35df166
to
63d7f59
Compare
This has been updated to use the new sess based refactoring |
} | ||
|
||
func resourceAwsCodeCommitRepositoryCreate(d *schema.ResourceData, meta interface{}) error { | ||
codecommitconn := meta.(*AWSClient).codecommitconn |
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.
Stylistically we've tended to call the client just conn
when it's a local variable.
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.
(Unless of course you're juggling two in a given function.)
This looks great! Merging as is and I'll fix that style nit on master. |
provider/aws: CodeCommit - Currently only in us-east-1
Wow, you are on fire tonight! thanks :) |
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. |
In order to run the acceptance tests, we need to set an ENV_VAR for Region to be us-east-1
then we get the following results: