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

Move enable_logging to GA for compute_firewall_rule #2752

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/ansible
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
2 changes: 1 addition & 1 deletion build/terraform-mapper
14 changes: 10 additions & 4 deletions products/compute/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2952,14 +2952,20 @@ objects:
not enforced and the network behaves as if it did not exist. If this
is unspecified, the firewall rule will be enabled.
send_empty_value: true
- !ruby/object:Api::Type::Boolean
name: 'enableLogging'
- !ruby/object:Api::Type::NestedObject
name: 'logConfig'
description: |
This field denotes whether to enable logging for a particular
firewall rule. If logging is enabled, logs will be exported to
Stackdriver.
min_version: beta
send_empty_value: true
properties:
- !ruby/object:Api::Type::Boolean
name: 'enableLogging'
send_empty_value: true
description: |
This field denotes whether to enable logging for a particular
firewall rule. If logging is enabled, logs will be exported to
Stackdriver.
- !ruby/object:Api::Type::Integer
name: 'id'
description: 'The unique identifier for the resource.'
Expand Down
5 changes: 5 additions & 0 deletions products/compute/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,11 @@ overrides: !ruby/object:Overrides::ResourceOverrides
# being ingress to egress without examining the diff carefully.
# See terraform issue #2713 for more context.
input: true
logConfig: !ruby/object:Overrides::Terraform::PropertyOverride
flatten_object: true
logConfig.enableLogging: !ruby/object:Overrides::Terraform::PropertyOverride
api_name: enable
send_empty_value: true
name: !ruby/object:Overrides::Terraform::PropertyOverride
validation: !ruby/object:Provider::Terraform::Validation
function: 'validateGCPName'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ func TestAccComputeFirewall_disabled(t *testing.T) {
})
}

<% unless version == 'ga' -%>
func TestAccComputeFirewall_enableLogging(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -236,7 +235,6 @@ func TestAccComputeFirewall_enableLogging(t *testing.T) {
},
})
}
<% end -%>

func testAccComputeFirewall_basic(network, firewall string) string {
return fmt.Sprintf(`
Expand Down Expand Up @@ -415,7 +413,6 @@ resource "google_compute_firewall" "foobar" {
`, network, firewall)
}

<% unless version == 'ga' -%>
func testAccComputeFirewall_enableLogging(network, firewall string, enableLogging bool) string {
enableLoggingCfg := ""
if enableLogging {
Expand All @@ -441,4 +438,3 @@ resource "google_compute_firewall" "foobar" {
}
`, network, firewall, enableLoggingCfg)
}
<% end -%>