-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
CloudFront Distribution should be able to set logging to disabled without removing config #11986
Comments
@zmeggyesi if you're using terraform 0.12 you can omit config blocks by using For example, I've done this before by doing something like the following (this is in a codebuild project) dynamic "artifacts" {
for_each = local.artifacts_given ? [] : [1]
content {
type = "NO_ARTIFACTS"
}
}
|
The thought has occurred to me, but the AWS provider simply threw an error on that, stating that In any case, I quickly added support for the |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
Requires action, still awaiting approval |
Community Note
Description
I have a use-case where I'm managing a number of CloudFront distributions via Terraform and some of them should log requests, while others should not.
Since my configuration is implemented with modules to denote the various distributions, it is not possible to set/omit the
logging_config
block on a module-by-module basis, but it should be possible to set the configuration'senabled
field tofalse
.New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: