Update README.md

This commit is contained in:
Daniel Marzini
2021-09-03 18:53:30 +02:00
parent ae2dddc192
commit 996b8d2aa6

View File

@@ -138,6 +138,48 @@ module "vpc-sc" {
## Example VCP-SC standard perimeter with one service and one project in dry run mode in a Organization with an already existent access policy
```hcl
module "vpc-sc-first" {
source = "./modules/vpc-sc"
organization_id = "organizations/112233"
access_policy_title = "My Org Access Policy"
access_levels = {
my_trusted_proxy = {
combining_function = "AND"
conditions = [{
ip_subnetworks = ["85.85.85.52/32"]
required_access_levels = null
members = []
negate = false
regions = null
}]
}
}
access_level_perimeters = {
enforced = {
my_trusted_proxy = ["perimeter"]
}
}
perimeters = {
perimeter = {
type = "PERIMETER_TYPE_REGULAR"
dry_run_config = {
restricted_services = ["storage.googleapis.com", "bigquery.googleapis.com"]
vpc_accessible_services = ["storage.googleapis.com", "bigquery.googleapis.com"]
}
enforced_config = {
restricted_services = ["storage.googleapis.com"]
vpc_accessible_services = ["storage.googleapis.com"]
}
}
}
perimeter_projects = {
perimeter = {
enforced = [111111111, 222222222]
dry_run = [333333333]
}
}
}
module "vpc-sc-second" {
source = "./modules/vpc-sc"
organization_id = "organizations/112233"
@@ -180,7 +222,7 @@ module "vpc-sc-second" {
}
}
}
# tftest:modules=1:resources=3
# tftest:modules=2:resources=5
```
<!-- BEGIN TFDOC -->
@@ -191,7 +233,7 @@ module "vpc-sc-second" {
| organization_id | Organization id in organizations/nnnnnn format. | <code title="">string</code> | ✓ | |
| *access_level_perimeters* | Enforced mode -> Access Level -> Perimeters mapping. Enforced mode can be 'enforced' or 'dry_run' | <code title="map&#40;map&#40;list&#40;string&#41;&#41;&#41;">map(map(list(string)))</code> | | <code title="">{}</code> |
| *access_levels* | Map of Access Levels to be created. For each Access Level you can specify 'ip_subnetworks, required_access_levels, members, negate or regions'. | <code title="map&#40;object&#40;&#123;&#10;combining_function &#61; string&#10;conditions &#61; list&#40;object&#40;&#123;&#10;ip_subnetworks &#61; list&#40;string&#41;&#10;required_access_levels &#61; list&#40;string&#41;&#10;members &#61; list&#40;string&#41;&#10;negate &#61; string&#10;regions &#61; list&#40;string&#41;&#10;&#125;&#41;&#41;&#10;&#125;&#41;&#41;">map(object({...}))</code> | | <code title="">{}</code> |
| *access_policy_create* | Enable autocreation of the Access Policy | <code title="">bool</code> | | <code title="">true</code> |
| *access_policy_create* | enable autocreation of the Access Policy | <code title="">bool</code> | | <code title="">true</code> |
| *access_policy_name* | Referenced Access Policy name | <code title="">string</code> | | <code title="">null</code> |
| *access_policy_title* | Access Policy title to be created. | <code title="">string</code> | | <code title="">null</code> |
| *egress_policies* | List of EgressPolicies in the form described in the [documentation](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/access_context_manager_service_perimeter#egress_policies) | <code title=""></code> | | <code title="">null</code> |