More sessions

This commit is contained in:
2026-02-24 18:03:22 +00:00
parent eb5bd4a929
commit 23cc78aa98
284 changed files with 129543 additions and 4 deletions

View File

@@ -0,0 +1,364 @@
Output too large. Showing first 8,000 and last 32,000 characters. For full output see: /Users/bob/.gemini/tmp/dalmatian/tool-outputs/session-cebedcb4-6673-4a0e-bf61-a131af573337/run_shell_command_1771600795702_0.txt
Output: ==> Installing Ruby and dependencies...
Successfully installed bundler-2.4.22
Parsing documentation for bundler-2.4.22
Done installing documentation for bundler after 0 seconds
1 gem installed
Bundle complete! 13 Gemfile dependencies, 53 gems now installed.
Bundled gems are installed into `../../../.bundles`
==> Installing Terraform and dependencies...
Terraform v1.9.8 is already installed
[*] Checking out 0.17.0 from git@github.com:cloudposse/terraform-aws-codebuild.git
[*] Checking out 2.1.0 from git@github.com:dxw/terraform-aws-github-ci.git
[*] Checking out 3cc589ecb5bf70fbd1188c47c915550235d4714b from git@github.com:dxw/terraform-aws-s3-bucket.git
[*] Checking out v2.70.0 from git@github.com:terraform-aws-modules/terraform-aws-vpc
[*] Checking out v5.7.0 from git@github.com:dxw/tf_aws_ecs.git
[*] Checking out 1.1.0 from git@github.com:dxw/terraform-aws-cloudtrail
[*] Checking out 0.28.2 from git@github.com:cloudposse/terraform-aws-efs
[*] Checking out v1.3.0 from git@github.com:claranet/terraform-aws-lambda
[*] Checking out v5.2.2 from git@github.com:terraform-aws-modules/terraform-aws-rds
[*] Checking out v8.3.1 from git@github.com:terraform-aws-modules/terraform-aws-rds-aurora.git
==> Checking for a 'dalmatian.yml' in the root...
Found: /Users/bob/git/dxw/dalmatian-config/dalmatian.yml
==> Linting YAML...
==> Linting shell scripts...
==> Checking Terraform for JSON errors...
- Checking ./terraform/policies/iam-read.json... Passed
- Checking ./terraform/policies/s3-rw-with-versioning.json... Passed
- Checking ./terraform/policies/codestar-connection-use.json... Passed
- Checking ./terraform/policies/iam-create-access-key.json... Passed
- Checking ./terraform/policies/codebuild.json... Passed
- Checking ./terraform/policies/kms-encrypt-decrypt.json... Passed
- Checking ./terraform/policies/iam-change-password.json... Passed
- Checking ./terraform/policies/administrator-access.json... Passed
- Checking ./terraform/policies/assume_roles/aws-backup.json... Passed
- Checking ./terraform/policies/assume_roles/autoscaling.json... Passed
- Checking ./terraform/policies/assume_roles/events.json... Passed
- Checking ./terraform/policies/assume_roles/ecs.json... Passed
- Checking ./terraform/policies/assume_roles/codepipeline.json... Passed
- Checking ./terraform/policies/iam-mfa.json... Passed
- Checking ./terraform/policies/route53-read.json... Passed
- Checking ./terraform/policies/s3-full-access.json... Passed
- Checking ./terraform/policies/parameter-store-read-decrypt.json... Passed
- Checking ./terraform/policies/s3-read.json... Passed
- Checking ./terraform/policies/parameter-store-RW-encrypt-decrypt.json... Passed
- Checking ./terraform/policies/all-read-with-billing.json... Passed
- Checking ./terraform/policies/codebuild-start-build.json... Passed
- Checking ./terraform/policies/all-read.json... Passed
==> Linting Terraform...
==> Running Ruby tests...
/Users/bob/.rbenv/versions/2.7.1/bin/ruby -I/Users/bob/.bundles/ruby/2.7.0/gems/rspec-core-3.12.2/lib:/Users/bob/.bundles/ruby/2.7.0/gems/rspec-support-3.12.1/lib /Users/bob/.bundles/ruby/2.7.0/gems/rspec-core-3.12.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
tests local configuration
use of "terraform apply"
passes the hosted zone config to "terraform apply" (FAILED - 1)
passes the s3 config to "terraform apply" (FAILED - 2)
passes the vpn customer gateway config to "terraform apply" (FAILED - 3)
passes the base config to "terraform apply" (FAILED - 4)
passes the waf config to "terraform apply" (FAILED - 5)
passes the rds config to "terraform apply" (FAILED - 6)
passes the elasticache config to "terraform apply" (FAILED - 7)
passes the opensearch config to "terraform apply" (FAILED - 8)
passes the service config to "terraform apply" (FAILED - 9)
passes the loadbalancer config to "terraform apply" (FAILED - 10)
passes the cluster 2 config to "terraform apply" (FAILED - 11)
passes the cluster 3 config to "terraform apply" (FAILED - 12)
passes the cluster 4 config to "terraform apply" (FAILED - 13)
tests remote configuration
retrieves the remotely held full configuration
proceeds with deploying the infrastructure as per the cached full configuration
tests local configuration
invokes "terraform validate" with the expected cluster options (FAILED - 14)
invokes "terraform validate" with the expected source options (FAILED - 15)
use of "terraform plan"
passes the hosted zone config to "terraform plan" (FAILED - 16)
passes the s3 config to "terraform plan" (FAILED - 17)
passes the vpn customer gateway config to "terraform plan" (FAILED - 18)
passes the base config to "terraform plan" (FAILED - 19)
passes the waf config to "terraform plan" (FAILED - 20)
passes the rds config to "terraform plan" (FAILED - 21)
passes the elasticache config to "terraform plan" (FAILED - 22)
passes the opensearch config to "terraform plan" (FAILED - 23)
passes the services config to "terraform plan" (FAILED - 24)
passes the loadbalancer config to "terraform plan" (FAILED - 25)
passes the cluster 2 config to "terraform plan" (FAILED - 26)
passes the cluster 3 config to "terraform plan" (FAILED - 27)
passes the cluster 4 config to "terraform plan" (FAILED - 28)
Dalmatian::Account
initialisation
gathering user input
asks the user for AWS credentials
asks the user for the AWS account id to use
asks the user for an account alias
#call
changes to the bootstrapping directory
runs terraform init with upgrade option
creates the new workspace using the given aws account id and alias
runs terraform apply with the user-supplied vars
Dalmatian::CacheHandlerSelector
::new_for(remote_reference)
when the remote reference is for a git repo
asks for an instance of GitCacheHandler
when the remote reference is for an S3 bucket
asks for an instance of S3CacheHandler
when the remote reference is for a URL
asks for an instance of UrlCacheHandler
when the type is unknown
raises an error
CacheHandler
when a subclass class does not implement #cache_remote_configuration
raises a helpful error
Dalmatian::CI
CI::PATH
is a constant
#deploy
changes to the ci directory
runs terraform init with upgrade option
creates the new workspace using the given aws account id and alias
runs terraform apply with the user-supplied vars
#test
runs terraform plan with the user-supplied vars
Dalmatian::ClusterDeployment
#call
changes to the ecs directory
asks Terraform to ensure that the workspace is in place
when the environment includes a git reference as "track_revision"
does NOT attempt to check out that commit
when in _plan_ mode
invokes Terraform.plan using the _dalmatian-read_ role
when NOT in _plan_ mode
invokes Terraform.apply using the _dalmatian-admin_
when in _auto_approve_ mode
asks Terraform to use auto_approve mode
Dalmatian::Cluster
on initialisation
makes Hosted zones, S3, Sources, Services, Loadbalancers, WAF and Rds
#target_directory
is a standard _ecs_ path
#id
is the primary key of the cluster definition is used
#name
when the cluster has an explicitly provided _name_ property
that property is used
when the cluster does not have an explicitly provided _name_ property
the primary key of the cluster definition is used
#account_id
is the aws account key for deployment
#sources
represents any links to remote sources
#environments
represents the attributes of each environment's cluster section
#fetch
when the source is remotely held
logs the plan to clone the source into the infrastructure pth
deletes any existing source at the infrastructure location
clones each source into the infrastructure location
changes to the infrastructure directory for ea
... [143,893 characters omitted] ...
atian/infrastructure.rb:22:in `each'
# ./lib/dalmatian/infrastructure.rb:22:in `deploy'
# ./lib/dalmatian/infrastructure.rb:18:in `test'
# ./spec/integration/tests_local_configuration_spec.rb:3108:in `block (2 levels) in <module:Dalmatian>'
# ./spec/support/spec_helper.rb:24:in `block (3 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:24:in `block in modify'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `synchronize'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `modify'
# ./spec/support/spec_helper.rb:20:in `block (2 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
24) tests local configuration use of "terraform plan" passes the services config to "terraform plan"
Failure/Error: Helper.run!(cmd)
#<Dalmatian::Helper (class)> received :run! with unexpected arguments
expected: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_example_var='bar' TF_VAR_environment='production' TF_VAR_cluster_name='shared-cluster-production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='existing-shared-cluster-production' TF_VAR_dalmatian_role='dalmatian-read' terraform plan")
got: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_environment='production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='new-dedicated-cluster' TF_VAR_dalmatian_role='dalmatian-read' TF_VAR_rds='{identifier =\"testservice\",in_use_by =[\"test-service\"],clusters_in_use ={production =[\"test\"],staging =[\"test\"]},instance_class ={production =\"db.t2.small\",staging =\"db.t2.micro\"},engine =\"postgres\",engine_version =\"11.4\",allocated_storage =20,storage_encrypted =true,storage_type =\"gp3\",db_name =\"testapp\",port =5432,maintenance_window =\"mon:19:00-mon:19:30\",backup_window =\"09:00-10:00\",backup_retention_period =31,force_ssl =true,parameter_store_path_db_url_name =\"DATABASE_URL\",sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],check_sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],sync_sql_backup_to_azure =false,replication_bucket_destination_arn =\"arn:aws:s3:::your-destination-bucket-name\",replication_kms_key_id =\"your-destination-kms-key-id\",codebuild_access =[\"service-name\"]}' terraform plan")
Please stub a default value first if message might be received with other args as well.
# ./lib/dalmatian/terraform.rb:25:in `plan'
# ./lib/dalmatian/deployable.rb:28:in `terraform_plan'
# ./lib/dalmatian/deployable.rb:8:in `call'
# ./lib/dalmatian/cluster.rb:269:in `deploy_rds'
# ./lib/dalmatian/cluster.rb:70:in `block (2 levels) in deploy'
# ./lib/dalmatian/cluster.rb:68:in `each'
# ./lib/dalmatian/cluster.rb:68:in `block in deploy'
# ./lib/dalmatian/cluster.rb:59:in `each'
# ./lib/dalmatian/cluster.rb:59:in `deploy'
# ./lib/dalmatian/infrastructure.rb:24:in `block in deploy'
# ./lib/dalmatian/infrastructure.rb:22:in `each'
# ./lib/dalmatian/infrastructure.rb:22:in `deploy'
# ./lib/dalmatian/infrastructure.rb:18:in `test'
# ./spec/integration/tests_local_configuration_spec.rb:3108:in `block (2 levels) in <module:Dalmatian>'
# ./spec/support/spec_helper.rb:24:in `block (3 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:24:in `block in modify'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `synchronize'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `modify'
# ./spec/support/spec_helper.rb:20:in `block (2 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
25) tests local configuration use of "terraform plan" passes the loadbalancer config to "terraform plan"
Failure/Error: Helper.run!(cmd)
#<Dalmatian::Helper (class)> received :run! with unexpected arguments
expected: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_example_var='bar' TF_VAR_environment='production' TF_VAR_cluster_name='shared-cluster-production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='existing-shared-cluster-production' TF_VAR_dalmatian_role='dalmatian-read' terraform plan")
got: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_environment='production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='new-dedicated-cluster' TF_VAR_dalmatian_role='dalmatian-read' TF_VAR_rds='{identifier =\"testservice\",in_use_by =[\"test-service\"],clusters_in_use ={production =[\"test\"],staging =[\"test\"]},instance_class ={production =\"db.t2.small\",staging =\"db.t2.micro\"},engine =\"postgres\",engine_version =\"11.4\",allocated_storage =20,storage_encrypted =true,storage_type =\"gp3\",db_name =\"testapp\",port =5432,maintenance_window =\"mon:19:00-mon:19:30\",backup_window =\"09:00-10:00\",backup_retention_period =31,force_ssl =true,parameter_store_path_db_url_name =\"DATABASE_URL\",sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],check_sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],sync_sql_backup_to_azure =false,replication_bucket_destination_arn =\"arn:aws:s3:::your-destination-bucket-name\",replication_kms_key_id =\"your-destination-kms-key-id\",codebuild_access =[\"service-name\"]}' terraform plan")
Please stub a default value first if message might be received with other args as well.
# ./lib/dalmatian/terraform.rb:25:in `plan'
# ./lib/dalmatian/deployable.rb:28:in `terraform_plan'
# ./lib/dalmatian/deployable.rb:8:in `call'
# ./lib/dalmatian/cluster.rb:269:in `deploy_rds'
# ./lib/dalmatian/cluster.rb:70:in `block (2 levels) in deploy'
# ./lib/dalmatian/cluster.rb:68:in `each'
# ./lib/dalmatian/cluster.rb:68:in `block in deploy'
# ./lib/dalmatian/cluster.rb:59:in `each'
# ./lib/dalmatian/cluster.rb:59:in `deploy'
# ./lib/dalmatian/infrastructure.rb:24:in `block in deploy'
# ./lib/dalmatian/infrastructure.rb:22:in `each'
# ./lib/dalmatian/infrastructure.rb:22:in `deploy'
# ./lib/dalmatian/infrastructure.rb:18:in `test'
# ./spec/integration/tests_local_configuration_spec.rb:3108:in `block (2 levels) in <module:Dalmatian>'
# ./spec/support/spec_helper.rb:24:in `block (3 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:24:in `block in modify'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `synchronize'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `modify'
# ./spec/support/spec_helper.rb:20:in `block (2 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
26) tests local configuration use of "terraform plan" passes the cluster 2 config to "terraform plan"
Failure/Error: Helper.run!(cmd)
#<Dalmatian::Helper (class)> received :run! with unexpected arguments
expected: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_example_var='bar' TF_VAR_environment='production' TF_VAR_cluster_name='shared-cluster-production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='existing-shared-cluster-production' TF_VAR_dalmatian_role='dalmatian-read' terraform plan")
got: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_environment='production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='new-dedicated-cluster' TF_VAR_dalmatian_role='dalmatian-read' TF_VAR_rds='{identifier =\"testservice\",in_use_by =[\"test-service\"],clusters_in_use ={production =[\"test\"],staging =[\"test\"]},instance_class ={production =\"db.t2.small\",staging =\"db.t2.micro\"},engine =\"postgres\",engine_version =\"11.4\",allocated_storage =20,storage_encrypted =true,storage_type =\"gp3\",db_name =\"testapp\",port =5432,maintenance_window =\"mon:19:00-mon:19:30\",backup_window =\"09:00-10:00\",backup_retention_period =31,force_ssl =true,parameter_store_path_db_url_name =\"DATABASE_URL\",sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],check_sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],sync_sql_backup_to_azure =false,replication_bucket_destination_arn =\"arn:aws:s3:::your-destination-bucket-name\",replication_kms_key_id =\"your-destination-kms-key-id\",codebuild_access =[\"service-name\"]}' terraform plan")
Please stub a default value first if message might be received with other args as well.
# ./lib/dalmatian/terraform.rb:25:in `plan'
# ./lib/dalmatian/deployable.rb:28:in `terraform_plan'
# ./lib/dalmatian/deployable.rb:8:in `call'
# ./lib/dalmatian/cluster.rb:269:in `deploy_rds'
# ./lib/dalmatian/cluster.rb:70:in `block (2 levels) in deploy'
# ./lib/dalmatian/cluster.rb:68:in `each'
# ./lib/dalmatian/cluster.rb:68:in `block in deploy'
# ./lib/dalmatian/cluster.rb:59:in `each'
# ./lib/dalmatian/cluster.rb:59:in `deploy'
# ./lib/dalmatian/infrastructure.rb:24:in `block in deploy'
# ./lib/dalmatian/infrastructure.rb:22:in `each'
# ./lib/dalmatian/infrastructure.rb:22:in `deploy'
# ./lib/dalmatian/infrastructure.rb:18:in `test'
# ./spec/integration/tests_local_configuration_spec.rb:3108:in `block (2 levels) in <module:Dalmatian>'
# ./spec/support/spec_helper.rb:24:in `block (3 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:24:in `block in modify'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `synchronize'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `modify'
# ./spec/support/spec_helper.rb:20:in `block (2 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
27) tests local configuration use of "terraform plan" passes the cluster 3 config to "terraform plan"
Failure/Error: Helper.run!(cmd)
#<Dalmatian::Helper (class)> received :run! with unexpected arguments
expected: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_example_var='bar' TF_VAR_environment='production' TF_VAR_cluster_name='shared-cluster-production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='existing-shared-cluster-production' TF_VAR_dalmatian_role='dalmatian-read' terraform plan")
got: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_environment='production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='new-dedicated-cluster' TF_VAR_dalmatian_role='dalmatian-read' TF_VAR_rds='{identifier =\"testservice\",in_use_by =[\"test-service\"],clusters_in_use ={production =[\"test\"],staging =[\"test\"]},instance_class ={production =\"db.t2.small\",staging =\"db.t2.micro\"},engine =\"postgres\",engine_version =\"11.4\",allocated_storage =20,storage_encrypted =true,storage_type =\"gp3\",db_name =\"testapp\",port =5432,maintenance_window =\"mon:19:00-mon:19:30\",backup_window =\"09:00-10:00\",backup_retention_period =31,force_ssl =true,parameter_store_path_db_url_name =\"DATABASE_URL\",sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],check_sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],sync_sql_backup_to_azure =false,replication_bucket_destination_arn =\"arn:aws:s3:::your-destination-bucket-name\",replication_kms_key_id =\"your-destination-kms-key-id\",codebuild_access =[\"service-name\"]}' terraform plan")
Please stub a default value first if message might be received with other args as well.
# ./lib/dalmatian/terraform.rb:25:in `plan'
# ./lib/dalmatian/deployable.rb:28:in `terraform_plan'
# ./lib/dalmatian/deployable.rb:8:in `call'
# ./lib/dalmatian/cluster.rb:269:in `deploy_rds'
# ./lib/dalmatian/cluster.rb:70:in `block (2 levels) in deploy'
# ./lib/dalmatian/cluster.rb:68:in `each'
# ./lib/dalmatian/cluster.rb:68:in `block in deploy'
# ./lib/dalmatian/cluster.rb:59:in `each'
# ./lib/dalmatian/cluster.rb:59:in `deploy'
# ./lib/dalmatian/infrastructure.rb:24:in `block in deploy'
# ./lib/dalmatian/infrastructure.rb:22:in `each'
# ./lib/dalmatian/infrastructure.rb:22:in `deploy'
# ./lib/dalmatian/infrastructure.rb:18:in `test'
# ./spec/integration/tests_local_configuration_spec.rb:3108:in `block (2 levels) in <module:Dalmatian>'
# ./spec/support/spec_helper.rb:24:in `block (3 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:24:in `block in modify'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `synchronize'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `modify'
# ./spec/support/spec_helper.rb:20:in `block (2 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
28) tests local configuration use of "terraform plan" passes the cluster 4 config to "terraform plan"
Failure/Error: Helper.run!(cmd)
#<Dalmatian::Helper (class)> received :run! with unexpected arguments
expected: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_example_var='bar' TF_VAR_environment='production' TF_VAR_cluster_name='shared-cluster-production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='existing-shared-cluster-production' TF_VAR_dalmatian_role='dalmatian-read' terraform plan")
got: ("TF_VAR_region='eu-west-2' TF_VAR_cidr='10.0.0.0/16' TF_VAR_root_domain_zone='dalmatian.dxw.net' TF_VAR_internal_domain_zone='dalmatian.internal' TF_VAR_ecs_private_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.128.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.129.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.130.0/24\"}]' TF_VAR_extra_public_subnets='[{availability_zone =\"eu-west-2a\",cidr =\"10.0.0.0/24\"},{availability_zone =\"eu-west-2b\",cidr =\"10.0.1.0/24\"},{availability_zone =\"eu-west-2c\",cidr =\"10.0.2.0/24\"}]' TF_VAR_instances_key_name='dalmatian-ecs-instances' TF_VAR_instance_type='t2.medium' TF_VAR_min_servers='2' TF_VAR_max_servers='4' TF_VAR_max_instance_lifetime='86400' TF_VAR_associate_public_ip_address='0' TF_VAR_docker_storage_size='40' TF_VAR_dockerhub_email='' TF_VAR_dockerhub_token='' TF_VAR_enable_efs='false' TF_VAR_encrypt_efs='true' TF_VAR_efs_dirs='[]' TF_VAR_monitoring_docs_path='https://github.com/dxw/dalmatian/docs/monitoring-alarms/' TF_VAR_environment='production' TF_VAR_account_id='123456789012' TF_VAR_infrastructure_name='new-dedicated-cluster' TF_VAR_dalmatian_role='dalmatian-read' TF_VAR_rds='{identifier =\"testservice\",in_use_by =[\"test-service\"],clusters_in_use ={production =[\"test\"],staging =[\"test\"]},instance_class ={production =\"db.t2.small\",staging =\"db.t2.micro\"},engine =\"postgres\",engine_version =\"11.4\",allocated_storage =20,storage_encrypted =true,storage_type =\"gp3\",db_name =\"testapp\",port =5432,maintenance_window =\"mon:19:00-mon:19:30\",backup_window =\"09:00-10:00\",backup_retention_period =31,force_ssl =true,parameter_store_path_db_url_name =\"DATABASE_URL\",sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],check_sql_backup_scheduled_task_environment_variables =[{name =\"foo\",value =\"bar\"}],sync_sql_backup_to_azure =false,replication_bucket_destination_arn =\"arn:aws:s3:::your-destination-bucket-name\",replication_kms_key_id =\"your-destination-kms-key-id\",codebuild_access =[\"service-name\"]}' terraform plan")
Please stub a default value first if message might be received with other args as well.
# ./lib/dalmatian/terraform.rb:25:in `plan'
# ./lib/dalmatian/deployable.rb:28:in `terraform_plan'
# ./lib/dalmatian/deployable.rb:8:in `call'
# ./lib/dalmatian/cluster.rb:269:in `deploy_rds'
# ./lib/dalmatian/cluster.rb:70:in `block (2 levels) in deploy'
# ./lib/dalmatian/cluster.rb:68:in `each'
# ./lib/dalmatian/cluster.rb:68:in `block in deploy'
# ./lib/dalmatian/cluster.rb:59:in `each'
# ./lib/dalmatian/cluster.rb:59:in `deploy'
# ./lib/dalmatian/infrastructure.rb:24:in `block in deploy'
# ./lib/dalmatian/infrastructure.rb:22:in `each'
# ./lib/dalmatian/infrastructure.rb:22:in `deploy'
# ./lib/dalmatian/infrastructure.rb:18:in `test'
# ./spec/integration/tests_local_configuration_spec.rb:3108:in `block (2 levels) in <module:Dalmatian>'
# ./spec/support/spec_helper.rb:24:in `block (3 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:24:in `block in modify'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `synchronize'
# /Users/bob/.bundles/ruby/2.7.0/gems/climate_control-1.2.0/lib/climate_control.rb:15:in `modify'
# ./spec/support/spec_helper.rb:20:in `block (2 levels) in <top (required)>'
# /Users/bob/.bundles/ruby/2.7.0/gems/webmock-3.19.1/lib/webmock/rspec.rb:39:in `block (2 levels) in <top (required)>'
Finished in 2.46 seconds (files took 0.77338 seconds to load)
478 examples, 28 failures
Failed examples:
rspec ./spec/integration/deploys_local_configuration_spec.rb:1581 # tests local configuration use of "terraform apply" passes the hosted zone config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1585 # tests local configuration use of "terraform apply" passes the s3 config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1589 # tests local configuration use of "terraform apply" passes the vpn customer gateway config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1593 # tests local configuration use of "terraform apply" passes the base config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1598 # tests local configuration use of "terraform apply" passes the waf config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1605 # tests local configuration use of "terraform apply" passes the rds config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1612 # tests local configuration use of "terraform apply" passes the elasticache config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1621 # tests local configuration use of "terraform apply" passes the opensearch config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1630 # tests local configuration use of "terraform apply" passes the service config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1637 # tests local configuration use of "terraform apply" passes the loadbalancer config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1646 # tests local configuration use of "terraform apply" passes the cluster 2 config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1653 # tests local configuration use of "terraform apply" passes the cluster 3 config to "terraform apply"
rspec ./spec/integration/deploys_local_configuration_spec.rb:1657 # tests local configuration use of "terraform apply" passes the cluster 4 config to "terraform apply"
rspec ./spec/integration/tests_local_configuration_spec.rb:3111 # tests local configuration invokes "terraform validate" with the expected cluster options
rspec ./spec/integration/tests_local_configuration_spec.rb:3147 # tests local configuration invokes "terraform validate" with the expected source options
rspec ./spec/integration/tests_local_configuration_spec.rb:3153 # tests local configuration use of "terraform plan" passes the hosted zone config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3159 # tests local configuration use of "terraform plan" passes the s3 config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3165 # tests local configuration use of "terraform plan" passes the vpn customer gateway config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3171 # tests local configuration use of "terraform plan" passes the base config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3178 # tests local configuration use of "terraform plan" passes the waf config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3185 # tests local configuration use of "terraform plan" passes the rds config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3192 # tests local configuration use of "terraform plan" passes the elasticache config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3201 # tests local configuration use of "terraform plan" passes the opensearch config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3210 # tests local configuration use of "terraform plan" passes the services config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3217 # tests local configuration use of "terraform plan" passes the loadbalancer config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3226 # tests local configuration use of "terraform plan" passes the cluster 2 config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3233 # tests local configuration use of "terraform plan" passes the cluster 3 config to "terraform plan"
rspec ./spec/integration/tests_local_configuration_spec.rb:3237 # tests local configuration use of "terraform plan" passes the cluster 4 config to "terraform plan"
Coverage report generated for RSpec to /Users/bob/git/dxw/dalmatian/coverage. 4253 / 4389 LOC (96.9%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
/Users/bob/.rbenv/versions/2.7.1/bin/ruby -I/Users/bob/.bundles/ruby/2.7.0/gems/rspec-core-3.12.2/lib:/Users/bob/.bundles/ruby/2.7.0/gems/rspec-support-3.12.1/lib /Users/bob/.bundles/ruby/2.7.0/gems/rspec-core-3.12.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
Exit Code: 1
Process Group PGID: 54733