Skip to content

Commit 680f745

Browse files
accesscontextmanager - Update perimeter fine grained resources with ingore_changes note (#12372) (#20439)
[upstream:1f3b302a8bf982f31ade3b085fa5057fc55af702] Signed-off-by: Modular Magician <[email protected]>
1 parent fe800f5 commit 680f745

5 files changed

+19
-4
lines changed

.changelog/12372.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

website/docs/r/access_context_manager_service_perimeter_dry_run_egress_policy.html.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ or query against a BigQuery dataset).
3131
~> **Note:** By default, updates to this resource will remove the EgressPolicy from the
3232
from the perimeter and add it back in a non-atomic manner. To ensure that the new EgressPolicy
3333
is added before the old one is removed, add a `lifecycle` block with `create_before_destroy = true` to this resource.
34+
~> **Note:** If this resource is used alongside a `google_access_context_manager_service_perimeter` resource,
35+
the service perimeter resource must have a `lifecycle` block with `ignore_changes = [spec[0].egress_policies]` so
36+
they don't fight over which egress rules should be in the policy.
3437

3538

3639
To get more information about ServicePerimeterDryRunEgressPolicy, see:
@@ -51,7 +54,7 @@ resource "google_access_context_manager_service_perimeter" "storage-perimeter" {
5154
restricted_services = ["storage.googleapis.com"]
5255
}
5356
lifecycle {
54-
ignore_changes = [status[0].resources]
57+
ignore_changes = [spec[0].egress_policies] # Allows egress policies to be managed by google_access_context_manager_service_perimeter_dry_run_egress_policy resources
5558
}
5659
}
5760

website/docs/r/access_context_manager_service_perimeter_dry_run_ingress_policy.html.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ or actions they match using the ingressTo field.
3232
~> **Note:** By default, updates to this resource will remove the IngressPolicy from the
3333
from the perimeter and add it back in a non-atomic manner. To ensure that the new IngressPolicy
3434
is added before the old one is removed, add a `lifecycle` block with `create_before_destroy = true` to this resource.
35+
~> **Note:** If this resource is used alongside a `google_access_context_manager_service_perimeter` resource,
36+
the service perimeter resource must have a `lifecycle` block with `ignore_changes = [spec[0].ingress_policies]` so
37+
they don't fight over which ingress rules should be in the policy.
3538

3639

3740
To get more information about ServicePerimeterDryRunIngressPolicy, see:
@@ -52,7 +55,7 @@ resource "google_access_context_manager_service_perimeter" "storage-perimeter" {
5255
restricted_services = ["storage.googleapis.com"]
5356
}
5457
lifecycle {
55-
ignore_changes = [status[0].resources]
58+
ignore_changes = [spec[0].ingress_policies] # Allows ingress policies to be managed by google_access_context_manager_service_perimeter_dry_run_ingress_policy resources
5659
}
5760
}
5861

website/docs/r/access_context_manager_service_perimeter_egress_policy.html.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ or query against a BigQuery dataset).
3131
~> **Note:** By default, updates to this resource will remove the EgressPolicy from the
3232
from the perimeter and add it back in a non-atomic manner. To ensure that the new EgressPolicy
3333
is added before the old one is removed, add a `lifecycle` block with `create_before_destroy = true` to this resource.
34+
~> **Note:** If this resource is used alongside a `google_access_context_manager_service_perimeter` resource,
35+
the service perimeter resource must have a `lifecycle` block with `ignore_changes = [status[0].egress_policies]` so
36+
they don't fight over which egress rules should be in the policy.
3437

3538

3639
To get more information about ServicePerimeterEgressPolicy, see:
@@ -51,7 +54,7 @@ resource "google_access_context_manager_service_perimeter" "storage-perimeter" {
5154
restricted_services = ["storage.googleapis.com"]
5255
}
5356
lifecycle {
54-
ignore_changes = [status[0].resources]
57+
ignore_changes = [status[0].egress_policies] # Allows ingress policies to be managed by google_access_context_manager_service_perimeter_egress_policy resources
5558
}
5659
}
5760

website/docs/r/access_context_manager_service_perimeter_ingress_policy.html.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ or actions they match using the ingressTo field.
3232
~> **Note:** By default, updates to this resource will remove the IngressPolicy from the
3333
from the perimeter and add it back in a non-atomic manner. To ensure that the new IngressPolicy
3434
is added before the old one is removed, add a `lifecycle` block with `create_before_destroy = true` to this resource.
35+
~> **Note:** If this resource is used alongside a `google_access_context_manager_service_perimeter` resource,
36+
the service perimeter resource must have a `lifecycle` block with `ignore_changes = [status[0].ingress_policies]` so
37+
they don't fight over which ingress rules should be in the policy.
3538

3639

3740
To get more information about ServicePerimeterIngressPolicy, see:
@@ -52,7 +55,7 @@ resource "google_access_context_manager_service_perimeter" "storage-perimeter" {
5255
restricted_services = ["storage.googleapis.com"]
5356
}
5457
lifecycle {
55-
ignore_changes = [status[0].resources]
58+
ignore_changes = [status[0].ingress_policies] # Allows ingress policies to be managed by google_access_context_manager_service_perimeter_ingress_policy resources
5659
}
5760
}
5861

0 commit comments

Comments
 (0)