-
Notifications
You must be signed in to change notification settings - Fork 6
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 AppConfig support #79
Conversation
Thank you for your contribution! 🚀 Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the Additional details:
|
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.
Welcome @Isaiah-Turner 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
updateInput.Description = aws.String(n.(string)) | ||
} | ||
|
||
if d.HasChange("name") { |
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.
just out of curiosity, does this handle things like can't update only create/destroy automatically? Or do you need to put in logic here to handle that?
configProfileName := aws.String(d.Get("name").(string)) | ||
configProfileDescription := aws.String(d.Get("description").(string)) | ||
locationURI := aws.String(d.Get("location_uri").(string)) | ||
retreivalRoleArn := aws.String(d.Get("retrieval_role_arn").(string)) |
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.
misspelling: retrievalRoleArn
configProfileName := aws.String(d.Get("name").(string)) | ||
configProfileDescription := aws.String(d.Get("description").(string)) | ||
retreivalRoleArn := aws.String(d.Get("retrieval_role_arn").(string)) | ||
if *retreivalRoleArn == "" { |
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.
spelling: retrieval
validation.StringLenBetween(0, 1024), | ||
), | ||
}, | ||
"monitor": { |
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.
I think in the description this is: "monitors" plural, not singular
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.
See #79 (comment)
EnvironmentId: environmentID, | ||
Description: environmentDescription, | ||
Name: environmentName, | ||
Monitors: monitorList, |
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.
is it not possible to update monitors since there's no getChange calling it?
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.
It would still update, since d.Get("monitors")
will get the current monitors. I looked at some other resources, and I think I don't need get changes. Other resources look like:
func resourceAwsDataSyncTaskUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).datasyncconn
if d.HasChanges("options", "name") {
input := &datasync.UpdateTaskInput{
Options: expandDataSyncOptions(d.Get("options").([]interface{})),
Name: aws.String(d.Get("name").(string)),
TaskArn: aws.String(d.Id()),
}
log.Printf("[DEBUG] Updating DataSync Task: %s", input)
if _, err := conn.UpdateTask(input); err != nil {
return fmt.Errorf("error creating DataSync Task: %s", err)
}
}
if d.HasChange("tags") {
o, n := d.GetChange("tags")
if err := keyvaluetags.DatasyncUpdateTags(conn, d.Id(), o, n); err != nil {
return fmt.Errorf("error updating DataSync Task (%s) tags: %s", d.Id(), err)
}
}
return resourceAwsDataSyncTaskRead(d, meta)
}
Ill update all the resources to match that kind of update. I think GetChange is for when a field has some specific extra processing that Terraform has to do if there's a change.
This PR adds AppConfig support to Terraform. See hashicorp#11973 for an overview of the configuration.
Output from acceptance testing: