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

google_access_context_manager_service_perimeter - beta support for ingressPolicies and egressPolicies #8412

Closed
eadred opened this issue Feb 8, 2021 · 4 comments

Comments

@eadred
Copy link
Contributor

eadred commented Feb 8, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

The Access Context Manager accessPolicies.servicePerimeters.create API method now supports ingressPolicies and egressPolicies in the ServicePerimeterConfig resource. This is available in beta in the 321.0.0 version of the SDK.

The google_access_context_manager_service_perimeter Terraform resource should support this in the Beta Google provider.

New or Affected Resource(s)

  • google_access_context_manager_service_perimeter

Potential Terraform Configuration

Example for enforced configuration. For dry run the same ingressPolicy/egressPolicy properties would be available for the spec block.

resource "google_access_context_manager_service_perimeter" "my_perimeter" {
  parent = "accessPolicies/1234567890"
  name   = "accessPolicies/1234567890/servicePerimeters/my_perimeter"
  
  # other settings...

  status {
    # other settings...

    # This is an example that doesn't show all possible properties in the API request payload.
    # In general, this structure should match the API payload schema

    ingressPolicy { # Allow this to be specified multiple times
      ingressFrom {
        source { # Allow this to be specified multiple times
          accessLevel = "accessPolicies/1234567890/accessPolicies/my_policy"
          resource = "projects/12345678"
        }
        identities = ["user:[email protected]"]
      }
      ingressTo {
        resources = ["projects/12345678"]
        operation { # Allow this to be specified multiple times
          serviceName = "storage.googleapis.com"
          methodSelector {
            method = "google.storage.objects.create"
          }
          methodSelector {
            method = "google.storage.buckets.testIamPermissions"
          }
        }
      }
    }

    egressPolicy { # Allow this to be specified multiple times
      egressFrom {
        identities = ["user:[email protected]"]
      }
      egressTo {
        resources = ["projects/12345678"]
        operation { # Allow this to be specified multiple times
          serviceName = "storage.googleapis.com"
          methodSelector {
            method = "google.storage.objects.create"
          }
          methodSelector {
            method = "google.storage.buckets.testIamPermissions"
          }
        }
      }  
    }
  }
}

References

None

@ghost ghost added the enhancement label Feb 8, 2021
@rileykarson rileykarson added this to the Goals milestone Feb 16, 2021
@eadred
Copy link
Contributor Author

eadred commented Feb 19, 2021

Duplicate of #8482

@eadred
Copy link
Contributor Author

eadred commented Feb 25, 2021

Another related PR: GoogleCloudPlatform/magic-modules#4509

@rileykarson
Copy link
Collaborator

Closed in GoogleCloudPlatform/magic-modules#4509, I think.

@ghost
Copy link

ghost commented Apr 22, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants