Skip to content

Commit

Permalink
Place security policy under folder for easier cleanup (#5174) (#10027)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Sep 8, 2021
1 parent 43e0024 commit 78a700f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .changelog/5174.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ To get more information about OrganizationSecurityPolicy, see:
```hcl
resource "google_compute_organization_security_policy" "policy" {
provider = google-beta
display_name = "tf-test%{random_suffix}"
parent = "organizations/123456789"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,20 @@ To get more information about OrganizationSecurityPolicyAssociation, see:


```hcl
resource "google_folder" "security_policy_target" {
provider = google-beta
display_name = "tf-test-secpol-%{random_suffix}"
parent = "organizations/123456789"
}
resource "google_compute_organization_security_policy" "policy" {
provider = google-beta
display_name = "tf-test%{random_suffix}"
parent = "organizations/123456789"
parent = google_folder.security_policy_target.name
}
resource "google_compute_organization_security_policy_rule" "policy" {
provider = google-beta
policy_id = google_compute_organization_security_policy.policy.id
action = "allow"
Expand All @@ -69,7 +73,6 @@ resource "google_compute_organization_security_policy_rule" "policy" {
resource "google_compute_organization_security_policy_association" "policy" {
provider = google-beta
name = "tf-test%{random_suffix}"
attachment_id = google_compute_organization_security_policy.policy.parent
policy_id = google_compute_organization_security_policy.policy.id
Expand Down Expand Up @@ -123,5 +126,4 @@ OrganizationSecurityPolicyAssociation can be imported using any of these accepte

```
$ terraform import google_compute_organization_security_policy_association.default {{policy_id}}/association/{{name}}
$ terraform import google_compute_organization_security_policy_association.default {{policy_id}}/{{name}}
```
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ To get more information about OrganizationSecurityPolicyRule, see:
```hcl
resource "google_compute_organization_security_policy" "policy" {
provider = google-beta
display_name = "tf-test%{random_suffix}"
parent = "organizations/123456789"
}
Expand Down Expand Up @@ -208,5 +207,4 @@ OrganizationSecurityPolicyRule can be imported using any of these accepted forma

```
$ terraform import google_compute_organization_security_policy_rule.default {{policy_id}}/priority/{{priority}}
$ terraform import google_compute_organization_security_policy_rule.default {{policy_id}}/{{priority}}
```

0 comments on commit 78a700f

Please sign in to comment.