File tree Expand file tree Collapse file tree 3 files changed +5
-14
lines changed
templates/terraform/examples
third_party/terraform/services/compute Expand file tree Collapse file tree 3 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,10 @@ api_resource_type_kind: SecurityPolicy
1717api_resource_field : ' associations'
1818description : |
1919 An association for the OrganizationSecurityPolicy.
20- min_version : ' beta'
2120references :
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'
2524docs :
2625id_format : ' {{policy_id}}/association/{{name}}'
2726base_url : ' {{policy_id}}'
@@ -45,7 +44,8 @@ read_error_transform: 'transformSecurityPolicyAssociationReadError'
4544examples :
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'
5151parameters :
@@ -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
6059properties :
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
Original file line number Diff line number Diff line change 11resource "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
87resource "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
1513resource "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
Original file line number Diff line number Diff line change 11package compute
2- {{- if ne $.TargetVersionName "ga" }}
32
43import (
54 "log"
@@ -25,4 +24,3 @@ func transformSecurityPolicyAssociationReadError(err error) error {
2524
2625 return err
2726}
28- {{- end }}
You can’t perform that action at this time.
0 commit comments