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

s3logging: default S3 domain to s3.amazonaws.com to match api default #12

Merged
merged 2 commits into from
Jul 6, 2017

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Jun 29, 2017

Set default value for the domain attribute in the s3logging block. Right now if it's not in us-east-1, you need to specify a value, but it seems now that the API will provide a default of s3.amazonaws.com so we need to match it.

Users specifying any valid value are unaffected, and users without a value are seeing a perpetual diff, so this should be fine in terms of backwards compatibility regarding the struct hash.

All our existing tests supplied a value here, so I add a new test with that uses the default.

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./fastly -v -run=TestAccFastlyServiceV1_s3logging -timeout 120m
=== RUN   TestAccFastlyServiceV1_s3logging_basic
--- PASS: TestAccFastlyServiceV1_s3logging_basic (33.43s)
=== RUN   TestAccFastlyServiceV1_s3logging_domain_default
--- PASS: TestAccFastlyServiceV1_s3logging_domain_default (15.20s)
=== RUN   TestAccFastlyServiceV1_s3logging_s3_env
--- PASS: TestAccFastlyServiceV1_s3logging_s3_env (16.60s)
=== RUN   TestAccFastlyServiceV1_s3logging_formatVersion
--- PASS: TestAccFastlyServiceV1_s3logging_formatVersion (14.53s)
PASS
ok      github.com/terraform-providers/terraform-provider-fastly/fastly 79.774s

Should fix #10 /cc @DanielRussell

@catsby catsby added the bug label Jun 29, 2017
@catsby catsby requested a review from radeksimko June 29, 2017 19:26
Copy link
Contributor

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

I left you one low-prio comment. If I understand correctly the API's behaviour regarding defaults has changed already, which already caused diffs to some people, so there's no point of adding any state migration. So if that's the case this LGTM.

"fastly_service_v1.foo", "name", name),
resource.TestCheckResourceAttr(
"fastly_service_v1.foo", "s3logging.#", "1"),
),
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we could also check that new default value of s3logging.<idx>.domain here, but it's no big deal.

@catsby catsby force-pushed the s3logging_default branch from 6933ff8 to e936dbf Compare July 6, 2017 16:12
@catsby catsby merged commit 39ea995 into master Jul 6, 2017
@catsby catsby deleted the s3logging_default branch July 6, 2017 16:13
phamann pushed a commit that referenced this pull request Aug 10, 2020
* Service WAF component implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

s3logging changes on each apply even if HCL did not change
2 participants