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

provider/aws: Add cloudwatch_log_group #2415

Merged
merged 3 commits into from
Oct 2, 2015

Conversation

radeksimko
Copy link
Member

Status

  • Reading existing group precisely (probably will have to look up in returned list)
  • Deleting group
  • Creating group
  • Docs
  • Acceptance tests

This should make #2384 much more useful.

Test plan

make testacc TEST=./builtin/providers/aws TESTARGS='-run=CloudWatchLogGroup' 2>~/tf.log
go generate ./...
TF_ACC=1 go test ./builtin/providers/aws -v -run=CloudWatchLogGroup -timeout 90m
=== RUN TestAccAWSCloudWatchLogGroup_basic
--- PASS: TestAccAWSCloudWatchLogGroup_basic (20.78s)
=== RUN TestAccAWSCloudWatchLogGroup_retentionPolicy
--- PASS: TestAccAWSCloudWatchLogGroup_retentionPolicy (35.24s)
=== RUN TestAccAWSCloudWatchLogGroup_multiple
--- PASS: TestAccAWSCloudWatchLogGroup_multiple (16.42s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    72.460s

cc @catsby

@radeksimko
Copy link
Member Author

This is now ready for review.

@josephholsten
Copy link
Contributor

@phinze 👀

log.Printf("[DEBUG] Found Log Group: %#v", *lg)

d.Set("arn", *lg.Arn)
d.Set("name", *lg.LogGroupName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine to leave, but for future reference, regular attributes do not need to be dereferenced when using d.Set.
Setting the ID with d.SetId still does, however.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good point. I will keep that in mind for next time.

@catsby
Copy link
Contributor

catsby commented Oct 2, 2015

LGTM, thanks!

catsby added a commit that referenced this pull request Oct 2, 2015
@catsby catsby merged commit 75c4ee0 into hashicorp:master Oct 2, 2015
@radeksimko radeksimko deleted the f-aws-cloudwatch-log-group branch October 2, 2015 21:13
@ghost
Copy link

ghost commented Apr 30, 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 30, 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.

4 participants