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

Deprecate plan runner fixture and all its variants #1339

Merged
merged 11 commits into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions fast/stages-multitenant/0-bootstrap-tenant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ As shown in the script output above, the provider file is a template used as a s

Note that the `outputs_location` variable is disabled by default, you need to explicitly set it in your `terraform.tfvars` file if you want output files to be generated by this stage. This is a sample `terraform.tfvars` that configures it, refer to the [org-level bootstrap stage documentation](../../stages/0-bootstrap/README.md#output-files-and-cross-stage-variables) for more details:

```hcl
```tfvars
juliocc marked this conversation as resolved.
Show resolved Hide resolved
outputs_location = "~/fast-config"
```

Expand All @@ -97,7 +97,7 @@ The globals variable file linked above contains definition which were set for th

The tenant configuration resides in the `tenant_config` variable, this is an example configuration for a tenant with comments explaining the different choices that need to be made:

```hcl
```tfvars
tenant_config = {
# used for the top-level folder name
descriptive_name = "My First Tenant"
Expand Down Expand Up @@ -142,7 +142,6 @@ tenant_config = {
# logging = "folders/0123456789"
# }
}
# tftest skip
```

Configure the tenant variable in a tfvars file for this stage. A few minor points worth noting:
Expand Down
2 changes: 1 addition & 1 deletion fast/stages-multitenant/1-resman-tenant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Once that is done, stage-level configuration variables are the same as the corre

Note that the `outputs_location` variable is disabled by default, you need to explicitly set it in your `terraform.tfvars` file if you want output files to be generated by this stage. This is a sample `terraform.tfvars` that configures it, refer to the [org-level bootstrap stage documentation](../../stages/0-bootstrap/README.md#output-files-and-cross-stage-variables) for more details:

```hcl
```tfvars
outputs_location = "~/fast-config"
```

Expand Down
2 changes: 1 addition & 1 deletion fast/stages/1-resman/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The latter set is explained in the [Customization](#customizations) sections bel

Note that the `outputs_location` variable is disabled by default, you need to explicitly set it in your `terraform.tfvars` file if you want output files to be generated by this stage. This is a sample `terraform.tfvars` that configures it, refer to the [bootstrap stage documentation](../0-bootstrap/README.md#output-files-and-cross-stage-variables) for more details:

```hcl
```tfvars
outputs_location = "~/fast-config"
```

Expand Down
5 changes: 2 additions & 3 deletions fast/stages/2-networking-a-peering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ The latter set is explained in the [Customization](#customizations) sections bel

Note that the `outputs_location` variable is disabled by default, you need to explicitly set it in your `terraform.tfvars` file if you want output files to be generated by this stage. This is a sample `terraform.tfvars` that configures it, refer to the [bootstrap stage documentation](../0-bootstrap/README.md#output-files-and-cross-stage-variables) for more details:

```hcl
```tfvars
outputs_location = "~/fast-config"
```

Expand Down Expand Up @@ -315,7 +315,7 @@ This stage includes basic support for an HA VPN connecting the landing zone in t

Support for the onprem VPN is disabled by default so that no resources are created, this is an example of how to configure the variable to enable the VPN:

```hcl
```tfvars
vpn_onprem_primary_config = {
peer_external_gateways = {
default = {
Expand Down Expand Up @@ -357,7 +357,6 @@ vpn_onprem_primary_config = {
}
}
}
# tftest skip
```

### Adding an environment
Expand Down
5 changes: 2 additions & 3 deletions fast/stages/2-networking-b-vpn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ The latter set is explained in the [Customization](#customizations) sections bel

Note that the `outputs_location` variable is disabled by default, you need to explicitly set it in your `terraform.tfvars` file if you want output files to be generated by this stage. This is a sample `terraform.tfvars` that configures it, refer to the [bootstrap stage documentation](../0-bootstrap/README.md#output-files-and-cross-stage-variables) for more details:

```hcl
```tfvars
outputs_location = "~/fast-config"
```

Expand Down Expand Up @@ -329,7 +329,7 @@ This stage includes basic support for an HA VPN connecting the landing zone in t

Support for the onprem VPN is disabled by default so that no resources are created, this is an example of how to configure the variable to enable the VPN:

```hcl
```tfvars
vpn_onprem_primary_config = {
peer_external_gateways = {
default = {
Expand Down Expand Up @@ -371,7 +371,6 @@ vpn_onprem_primary_config = {
}
}
}
# tftest skip
```

### Adding an environment
Expand Down
5 changes: 2 additions & 3 deletions fast/stages/2-networking-c-nva/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ The latter set is explained in the [Customization](#customizations) sections bel

Note that the `outputs_location` variable is disabled by default, you need to explicitly set it in your `terraform.tfvars` file if you want output files to be generated by this stage. This is a sample `terraform.tfvars` that configures it, refer to the [bootstrap stage documentation](../0-bootstrap/README.md#output-files-and-cross-stage-variables) for more details:

```hcl
```tfvars
outputs_location = "~/fast-config"
```

Expand Down Expand Up @@ -397,7 +397,7 @@ This stage includes basic support for an HA VPN connecting the landing zone in t

Support for the onprem VPNs is disabled by default so that no resources are created, this is an example of how to configure one variable to enable the VPN in the primary region:

```hcl
```tfvars
vpn_onprem_primary_config = {
peer_external_gateways = {
default = {
Expand Down Expand Up @@ -439,7 +439,6 @@ vpn_onprem_primary_config = {
}
}
}
# tftest skip
```

### Adding an environment
Expand Down
5 changes: 2 additions & 3 deletions fast/stages/2-networking-d-separate-envs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ The latter set is explained in the [Customization](#customizations) sections bel

Note that the `outputs_location` variable is disabled by default, you need to explicitly set it in your `terraform.tfvars` file if you want output files to be generated by this stage. This is a sample `terraform.tfvars` that configures it, refer to the [bootstrap stage documentation](../0-bootstrap/README.md#output-files-and-cross-stage-variables) for more details:

```hcl
```tfvars
outputs_location = "~/fast-config"
```

Expand Down Expand Up @@ -270,7 +270,7 @@ This stage includes basic support for an HA VPN connecting each environment land

Support for the onprem VPNs is disabled by default so that no resources are created, this is an example of how to configure one variable to enable the VPN for dev in the primary region:

```hcl
```tfvars
vpn_onprem_dev_primary_config = {
peer_external_gateways = {
default = {
Expand Down Expand Up @@ -312,7 +312,6 @@ vpn_onprem_dev_primary_config = {
}
}
}
# tftest skip
```

### Changing default regions
Expand Down
5 changes: 2 additions & 3 deletions fast/stages/2-networking-e-nva-bgp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ The latter set is explained in the [Customization](#customizations) sections bel

Note that the `outputs_location` variable is disabled by default, you need to explicitly set it in your `terraform.tfvars` file if you want output files to be generated by this stage. This is a sample `terraform.tfvars` that configures it, refer to the [bootstrap stage documentation](../0-bootstrap/README.md#output-files-and-cross-stage-variables) for more details:

```hcl
```tfvars
outputs_location = "~/fast-config"
```

Expand Down Expand Up @@ -419,7 +419,7 @@ This stage includes basic support for an HA VPN connecting the landing zone in t

Support for the onprem VPNs is disabled by default so that no resources are created, this is an example of how to configure one variable to enable the VPN in the primary region:

```hcl
```tfvars
vpn_onprem_primary_config = {
peer_external_gateways = {
default = {
Expand Down Expand Up @@ -461,7 +461,6 @@ vpn_onprem_primary_config = {
}
}
}
# tftest skip
```

### Adding an environment
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/2-security/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The latter set is explained in the [Customization](#customizations) sections bel

Note that the `outputs_location` variable is disabled by default, you need to explicitly set it in your `terraform.tfvars` file if you want output files to be generated by this stage. This is a sample `terraform.tfvars` that configures it, refer to the [bootstrap stage documentation](../0-bootstrap/README.md#output-files-and-cross-stage-variables) for more details:

```hcl
```tfvars
outputs_location = "~/fast-config"
```

Expand Down
12 changes: 6 additions & 6 deletions modules/bigquery-dataset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module "bigquery-dataset" {
view_1 = "my-project|my-dataset|my-table"
}
}
# tftest modules=1 resources=5
# tftest modules=1 resources=5 inventory=simple.yaml
```

### IAM roles
Expand All @@ -51,7 +51,7 @@ module "bigquery-dataset" {
"roles/bigquery.dataOwner" = ["user:[email protected]"]
}
}
# tftest modules=1 resources=2
# tftest modules=1 resources=2 inventory=iam.yaml
```

### Dataset options
Expand All @@ -70,7 +70,7 @@ module "bigquery-dataset" {
max_time_travel_hours = 168
}
}
# tftest modules=1 resources=1
# tftest modules=1 resources=1 inventory=options.yaml
```

### Tables and views
Expand Down Expand Up @@ -100,7 +100,7 @@ module "bigquery-dataset" {
}
}
}
# tftest modules=1 resources=2
# tftest modules=1 resources=2 inventory=tables.yaml
```

If partitioning is needed, populate the `partitioning` variable using either the `time` or `range` attribute.
Expand Down Expand Up @@ -132,7 +132,7 @@ module "bigquery-dataset" {
}
}
}
# tftest modules=1 resources=2
# tftest modules=1 resources=2 inventory=partitioning.yaml
```

To create views use the `view` variable. If you're querying a table created by the same module `terraform apply` will initially fail and eventually succeed once the underlying table has been created. You can probably also use the module's output in the view's query to create a dependency on the table.
Expand Down Expand Up @@ -170,7 +170,7 @@ module "bigquery-dataset" {
}
}

# tftest modules=1 resources=3
# tftest modules=1 resources=3 inventory=views.yaml
```
<!-- BEGIN TFDOC -->

Expand Down
4 changes: 2 additions & 2 deletions modules/billing-budget/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module "budget" {
emails = ["[email protected]"]
}
}
# tftest modules=1 resources=2
# tftest modules=1 resources=2 inventory=email.yaml
```

### Pubsub notification
Expand All @@ -59,7 +59,7 @@ module "pubsub" {
name = "budget-topic"
}

# tftest modules=2 resources=2
# tftest modules=2 resources=2 inventory=pubsub.yaml
```
<!-- BEGIN TFDOC -->

Expand Down
8 changes: 4 additions & 4 deletions modules/compute-mig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module "nginx-mig" {
target_size = 2
instance_template = module.nginx-template.template.self_link
}
# tftest modules=2 resources=2
# tftest modules=2 resources=2 inventory=simple.yaml
```

### Multiple versions
Expand Down Expand Up @@ -149,7 +149,7 @@ module "nginx-mig" {
}
}
}
# tftest modules=2 resources=3
# tftest modules=2 resources=3 inventory=health-check.yaml
```

### Autoscaling
Expand Down Expand Up @@ -202,7 +202,7 @@ module "nginx-mig" {
}
}
}
# tftest modules=2 resources=3
# tftest modules=2 resources=3 inventory=autoscaling.yaml
```

### Update policy
Expand Down Expand Up @@ -408,7 +408,7 @@ module "nginx-mig" {
}
}
}
# tftest modules=2 resources=4
# tftest modules=2 resources=4 inventory=stateful.yaml

```
<!-- BEGIN TFDOC -->
Expand Down
4 changes: 2 additions & 2 deletions modules/gke-hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module "cluster_1" {
network = module.vpc.self_link
subnetwork = module.vpc.subnet_self_links["europe-west1/cluster-1"]
master_authorized_ranges = {
fc1918_10_8 = "10.0.0.0/8"
rfc1918_10_8 = "10.0.0.0/8"
}
master_ipv4_cidr_block = "192.168.0.0/28"
}
Expand Down Expand Up @@ -119,7 +119,7 @@ module "hub" {
}
}

# tftest modules=4 resources=16
# tftest modules=4 resources=16 inventory=full.yaml
```

## Multi-cluster mesh on GKE
Expand Down
2 changes: 1 addition & 1 deletion modules/kms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module "kms" {
key-c = { rotation_period = null, labels = { env = "test" } }
}
}
# tftest modules=1 resources=9
# tftest modules=1 resources=9 inventory=basic.yaml
```

### Crypto key purpose
Expand Down
12 changes: 6 additions & 6 deletions modules/net-address/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ module "addresses" {
source = "./fabric/modules/net-address"
project_id = var.project_id
external_addresses = {
nat-1 = var.region
vpn-remote = var.region
one = "europe-west1"
two = "europe-west2"
}
global_addresses = ["app-1", "app-2"]
}
# tftest modules=1 resources=4
# tftest modules=1 resources=4 inventory=external.yaml
```

### Internal addresses
Expand All @@ -38,7 +38,7 @@ module "addresses" {
}
}
}
# tftest modules=1 resources=2
# tftest modules=1 resources=2 inventory=internal.yaml
```

### PSA addresses
Expand All @@ -55,7 +55,7 @@ module "addresses" {
}
}
}
# tftest modules=1 resources=1
# tftest modules=1 resources=1 inventory=psa.yaml
```

### PSC addresses
Expand All @@ -75,7 +75,7 @@ module "addresses" {
}
}
}
# tftest modules=1 resources=2
# tftest modules=1 resources=2 inventory=psc.yaml
```
<!-- BEGIN TFDOC -->

Expand Down
1 change: 1 addition & 0 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def inner(module_path, basedir=None, tf_var_files=None, extra_files=None,
**tf_vars):
if basedir is None:
basedir = Path(request.fspath).parent
print(f"{basedir=}")
return plan_summary(module_path=module_path, basedir=basedir,
tf_var_files=tf_var_files, extra_files=extra_files,
**tf_vars)
Expand Down
Loading