Skip to content

Commit 12d83d2

Browse files
authored
Bump Cloud Armor Hierchical Policies - Security Policy Associations to GA (#15468)
1 parent 371ab41 commit 12d83d2

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

mmv1/products/compute/OrganizationSecurityPolicyAssociation.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ api_resource_type_kind: SecurityPolicy
1717
api_resource_field: 'associations'
1818
description: |
1919
An association for the OrganizationSecurityPolicy.
20-
min_version: 'beta'
2120
references:
2221
guides:
2322
'Associating a policy with the organization or folder': 'https://cloud.google.com/vpc/docs/using-firewall-policies#associate'
24-
api: 'https://cloud.google.com/compute/docs/reference/rest/beta/organizationSecurityPolicies/addAssociation'
23+
api: 'https://cloud.google.com/compute/docs/reference/rest/v1/organizationSecurityPolicies/addAssociation'
2524
docs:
2625
id_format: '{{policy_id}}/association/{{name}}'
2726
base_url: '{{policy_id}}'
@@ -45,7 +44,8 @@ read_error_transform: 'transformSecurityPolicyAssociationReadError'
4544
examples:
4645
- name: 'organization_security_policy_association_basic'
4746
primary_resource_id: 'policy'
48-
min_version: 'beta'
47+
vars:
48+
short_name: "my-short-name"
4949
test_env_vars:
5050
org_id: 'ORG_ID'
5151
parameters:
@@ -54,25 +54,21 @@ parameters:
5454
description: |
5555
The security policy ID of the association.
5656
api_name: securityPolicyId
57-
min_version: 'beta'
5857
url_param_only: true
5958
required: true
6059
properties:
6160
- name: 'name'
6261
type: String
6362
description: |
6463
The name for an association.
65-
min_version: 'beta'
6664
required: true
6765
- name: 'attachmentId'
6866
type: String
6967
description: |
7068
The resource that the security policy is attached to.
71-
min_version: 'beta'
7269
required: true
7370
- name: 'displayName'
7471
type: String
7572
description: |
7673
The display name of the security policy of the association.
77-
min_version: 'beta'
7874
output: true

mmv1/templates/terraform/examples/organization_security_policy_association_basic.tf.tmpl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
resource "google_folder" "security_policy_target" {
2-
provider = google-beta
32
display_name = "tf-test-secpol-%{random_suffix}"
43
parent = "organizations/{{index $.TestEnvVars "org_id"}}"
54
deletion_protection = false
65
}
76

87
resource "google_compute_organization_security_policy" "policy" {
9-
provider = google-beta
10-
display_name = "tf-test%{random_suffix}"
8+
short_name = "tf-test%{random_suffix}"
119
parent = google_folder.security_policy_target.name
12-
type = "FIREWALL"
10+
type = "CLOUD_ARMOR"
1311
}
1412

1513
resource "google_compute_organization_security_policy_association" "{{$.PrimaryResourceId}}" {
16-
provider = google-beta
1714
name = "tf-test%{random_suffix}"
1815
attachment_id = google_compute_organization_security_policy.{{$.PrimaryResourceId}}.parent
1916
policy_id = google_compute_organization_security_policy.{{$.PrimaryResourceId}}.id

mmv1/third_party/terraform/services/compute/security_policy_association_utils.go.tmpl renamed to mmv1/third_party/terraform/services/compute/security_policy_association_utils.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
package compute
2-
{{- if ne $.TargetVersionName "ga" }}
32

43
import (
54
"log"
@@ -25,4 +24,3 @@ func transformSecurityPolicyAssociationReadError(err error) error {
2524

2625
return err
2726
}
28-
{{- end }}

0 commit comments

Comments
 (0)