Skip to content

Instantly share code, notes, and snippets.

@calum-github
Created May 20, 2021 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calum-github/bcb5f49d7120d82fa04dd7e758c9160f to your computer and use it in GitHub Desktop.
Save calum-github/bcb5f49d7120d82fa04dd7e758c9160f to your computer and use it in GitHub Desktop.
# Creates an Access Level
# This access level will be used in
# a conditional IAM policy to restrict access
# to authorised users coming from authorised networks
resource "google_access_context_manager_access_level" "access-level" {
parent = "accessPolicies/<access-policy-id>"
name = "accessPolicies/<access-policy-id>/accessLevels/<my_access_level_name>"
title = "secure-iap-access-level"
description = "This access level lists the authorised network addresses"
basic {
conditions {
ip_subnetworks = [
"10.0.0.1/32",
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment