Skip to content

Commit

Permalink
Fix test domain for Cloud Run Domain Mapping (#2899)
Browse files Browse the repository at this point in the history
Merged PR #2899.
  • Loading branch information
emilymye authored and modular-magician committed Dec 30, 2019
1 parent bb9bc9c commit ed947a9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
2 changes: 0 additions & 2 deletions products/appengine/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
- !ruby/object:Provider::Terraform::Examples
name: "app_engine_domain_mapping_basic"
primary_resource_id: "domain_mapping"
vars:
domain: "dm-test-"
custom_code: !ruby/object:Provider::Terraform::CustomCode
constants: templates/terraform/constants/domain_mapping.erb
properties:
Expand Down
2 changes: 0 additions & 2 deletions products/cloudrun/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
primary_resource_id: "default"
vars:
cloud_run_service_name: "tftest-cloudrun"
test_custom_context:
verified_domain: "\"tftest-domainmapping.com\""
test_env_vars:
namespace: :PROJECT_NAME
custom_code: !ruby/object:Provider::Terraform::CustomCode
Expand Down
4 changes: 3 additions & 1 deletion provider/terraform/examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,13 @@ def oics_link
)
end

# rubocop:disable Metrics/LineLength
def substitute_test_paths(config)
config.gsub!('../static/img/header-logo.png', 'test-fixtures/header-logo.png')
config.gsub!('path/to/private.key', 'test-fixtures/ssl_cert/test.key')
config.gsub!('path/to/certificate.crt', 'test-fixtures/ssl_cert/test.crt')
config.gsub!('path/to/index.zip', '%{zip_path}')
config.gsub!('verified-domain.com', '%{verified_domain}')
config.gsub!('verified-domain.com', 'tf-test-domain%{random_suffix}.gcp.tfacc.hashicorptest.com')
config
end

Expand All @@ -197,6 +198,7 @@ def substitute_example_paths(config)
config.gsub!('path/to/certificate.crt', '../static/ssl_cert/test.crt')
config
end
# rubocop:enable Metrics/LineLength
# rubocop:enable Style/FormatStringToken

def validate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "google_app_engine_domain_mapping" "<%= ctx[:primary_resource_id] %>" {
domain_name = "<%= ctx[:vars]["domain"] %>.gcp.tfacc.hashicorptest.com"
domain_name = "verified-domain.com"

ssl_settings {
ssl_management_type = "AUTOMATIC"
Expand Down

0 comments on commit ed947a9

Please sign in to comment.