Skip to content

Commit

Permalink
allow mock_outputs during destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Jan 14, 2023
1 parent 346551f commit 770d6f1
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dependency "kubernetes" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
cluster_arn = "fake-cluster-arn"
cluster_certificate_authority_data = "fake-cert"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
public_subnets = ["fake-public-subnet-01", "fake-public-subnet-02"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
public_subnets = ["fake-public-subnet-01", "fake-public-subnet-02"]
Expand All @@ -45,7 +45,7 @@ dependency "kubernetes_ingress_clb" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
cluster_arn = "flake-cluster-arn"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
public_subnets = ["fake-public-subnet-01", "fake-public-subnet-02"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
public_subnets = ["fake-public-subnet-01", "fake-public-subnet-02"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
public_subnets = ["fake-public-subnet-01", "fake-public-subnet-02"]
Expand All @@ -50,7 +50,7 @@ dependency "kubernetes" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate", "plan"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "plan", "destroy"]
mock_outputs = {
karpenter_node_group_iam_role_name = "fake-karpenter-node-group-iam-role-name"
karpenter_node_group_iam_role_arn = "fake-karpenter-node-group-iam-role-arn"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
public_subnets = ["fake-public-subnet-01", "fake-public-subnet-02"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
public_subnets = ["fake-public-subnet-01", "fake-public-subnet-02"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
public_subnets = ["fake-public-subnet-01", "fake-public-subnet-02"]
Expand All @@ -49,7 +49,7 @@ dependency "kubernetes" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate", "plan"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "plan", "destroy"]
mock_outputs = {
karpenter_node_group_iam_role_name = "fake-karpenter-node-group-iam-role-name"
karpenter_node_group_iam_role_arn = "fake-karpenter-node-group-iam-role-arn"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
database_subnets = ["fake-subnetid-01", "fake-subnetid-02"]
Expand All @@ -48,7 +48,7 @@ dependency "kubernetes" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
cluster_arn = "fake-cluster-arn"
cluster_certificate_authority_data = "fake-cert"
Expand All @@ -74,14 +74,16 @@ dependency "bastion" {
config_path = "../ec2_bastion"
skip_outputs = true

mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {}
}

dependency "mongodb_volume" {

config_path = "../mongodb_volume"
# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
mongodb_volume_id = "fake-volume-id"
mongodb_volume_arn = "fake-volume-arn"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
database_subnets = ["fake-subnetid-01", "fake-subnetid-02"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependency "vpc" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
vpc_id = "fake-vpc-id"
database_subnets = ["fake-subnetid-01", "fake-subnetid-02"]
Expand All @@ -45,7 +45,7 @@ dependency "kubernetes" {

# Configure mock outputs for the `validate` and `init` commands that are returned when there are no outputs available (e.g the
# module hasn't been applied yet.
mock_outputs_allowed_terraform_commands = ["init", "validate"]
mock_outputs_allowed_terraform_commands = ["init", "validate", "destroy"]
mock_outputs = {
cluster_arn = "fake-cluster-arn"
cluster_certificate_authority_data = "fake-cert"
Expand Down

0 comments on commit 770d6f1

Please sign in to comment.