Skip to content

Commit

Permalink
Merge branch 'master' into inspec-spanner-db
Browse files Browse the repository at this point in the history
  • Loading branch information
Experience Coder authored Oct 18, 2019
2 parents 5f407f4 + 72c6dd8 commit 462605d
Show file tree
Hide file tree
Showing 13 changed files with 132 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .ci/ci.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,15 @@ jobs:

- put: {{v.short_name}}-intermediate
params:
repository: terraform-diff/new
repository: terraform-diff/{{k}}/new
branch_file: magic-modules-branched/branchname
force: true
get_params:
skip_clone: true

- put: {{v.short_name}}-intermediate
params:
repository: terraform-diff/old
repository: terraform-diff/{{k}}/old
branch_file: magic-modules-previous/branchname
force: true
get_params:
Expand Down
6 changes: 4 additions & 2 deletions .ci/magic-modules/diff-terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,7 @@ for mm_dir in magic-modules-branched magic-modules-previous; do

done

git clone "magic-modules-branched/build/$SHORT_NAME" "./terraform-diff/new"
git clone "magic-modules-previous/build/$SHORT_NAME" "./terraform-diff/old"
mkdir "./terraform-diff/$VERSION"

git clone "magic-modules-branched/build/$SHORT_NAME" "./terraform-diff/$VERSION/new"
git clone "magic-modules-previous/build/$SHORT_NAME" "./terraform-diff/$VERSION/old"
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
2 changes: 1 addition & 1 deletion build/terraform-mapper
2 changes: 2 additions & 0 deletions products/appengine/ansible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ datasources: !ruby/object:Overrides::ResourceOverrides
DomainMapping: !ruby/object:Overrides::Ansible::ResourceOverride
exclude: true
overrides: !ruby/object:Overrides::ResourceOverrides
ApplicationUrlDispatchRules: !ruby/object:Overrides::Ansible::ResourceOverride
exclude: true
FirewallRule: !ruby/object:Overrides::Ansible::ResourceOverride
# Because of lack of state, Ansible treats identity
# differently than Terraform.
Expand Down
57 changes: 57 additions & 0 deletions products/appengine/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -446,3 +446,60 @@ objects:
Instance class that is used to run this version. Valid values are
AutomaticScaling F1, F2, F4, F4_1G
(Only AutomaticScaling is supported at the moment)
- !ruby/object:Api::Resource
name: 'ApplicationUrlDispatchRules'
description: |
Rules to match an HTTP request and dispatch that request to a service.
base_url: 'apps/{{project}}'
create_url: 'apps/{{project}}?updateMask=dispatch_rules'
create_verb: :PATCH
delete_url: 'apps/{{project}}?updateMask=dispatch_rules'
delete_verb: :PATCH
update_url: 'apps/{{project}}?updateMask=dispatch_rules'
update_verb: :PATCH
references: !ruby/object:Api::Resource::ReferenceLinks
api: 'https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps#UrlDispatchRule'
async: !ruby/object:Api::Async
operation: !ruby/object:Api::Async::Operation
path: 'name'
base_url: '{{op_id}}'
wait_ms: 1000
result: !ruby/object:Api::Async::Result
path: 'response'
status: !ruby/object:Api::Async::Status
path: 'status'
complete: 'DONE'
allowed:
- 'PENDING'
- 'RUNNING'
- 'DONE'
error: !ruby/object:Api::Async::Error
path: 'error/errors'
message: 'message'
properties:
- !ruby/object:Api::Type::Array
name: 'dispatchRules'
required: true
description: |
Rules to match an HTTP request and dispatch that request to a service.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: 'domain'
default_value: '*'
description: |
Domain name to match against. The wildcard "*" is supported if specified before a period: "*.".
Defaults to matching all domains: "*".
- !ruby/object:Api::Type::String
name: 'path'
description: |
Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path.
The sum of the lengths of the domain and path may not exceed 100 characters.
required: true
- !ruby/object:Api::Type::String
name: 'service'
description: |
Pathname within the host. Must start with a "/". A single "*" can be included at the end of the path.
The sum of the lengths of the domain and path may not exceed 100 characters.
required: true

2 changes: 2 additions & 0 deletions products/appengine/inspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
--- !ruby/object:Provider::Inspec::Config
legacy_name: appengine
overrides: !ruby/object:Overrides::ResourceOverrides
ApplicationUrlDispatchRules: !ruby/object:Overrides::Inspec::ResourceOverride
exclude: true
DomainMapping: !ruby/object:Overrides::Inspec::ResourceOverride
exclude: true
FirewallRule: !ruby/object:Overrides::Inspec::ResourceOverride
Expand Down
17 changes: 15 additions & 2 deletions products/appengine/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides
StandardAppVersion: !ruby/object:Overrides::Terraform::ResourceOverride
id_format: "apps/{{project}}/services/{{service}}/versions/{{version_id}}"
import_format: ["apps/{{project}}/services/{{service}}/versions/{{version_id}}"]
mutex: "apps/{{project}}/services/{{service}}"
mutex: "apps/{{project}}"
parameters:
service: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
Expand All @@ -43,7 +43,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides
If set to `true`, the service will be deleted if it is the last version.
custom_code: !ruby/object:Provider::Terraform::CustomCode
custom_delete: templates/terraform/custom_delete/appversion_delete.go.erb
test_check_destroy: templates/terraform/custom_check_destroy/appengine_version.go.erb
test_check_destroy: templates/terraform/custom_check_destroy/appengine.go.erb
properties:
id: !ruby/object:Overrides::Terraform::PropertyOverride
name: 'version_id'
Expand Down Expand Up @@ -93,6 +93,19 @@ overrides: !ruby/object:Overrides::ResourceOverrides
update_mask_fields:
- "ssl_settings.certificate_id"
- "ssl_settings.ssl_management_type"
ApplicationUrlDispatchRules: !ruby/object:Overrides::Terraform::ResourceOverride
id_format: "{{project}}"
import_format: ["{{project}}"]
mutex: "apps/{{project}}"
custom_code: !ruby/object:Provider::Terraform::CustomCode
test_check_destroy: templates/terraform/custom_check_destroy/appengine.go.erb
examples:
- !ruby/object:Provider::Terraform::Examples
name: "app_engine_application_url_dispatch_rules_basic"
primary_resource_id: "service_rules"
vars:
project: "my-project"
bucket_name: "appengine-test-bucket"

# This is for copying files over
files: !ruby/object:Provider::Config::Files
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
resource "google_storage_bucket" "bucket" {
name = "<%= ctx[:vars]['bucket_name'] %>"
}

resource "google_storage_bucket_object" "object" {
name = "hello-world.zip"
bucket = "${google_storage_bucket.bucket.name}"
source = "./test-fixtures/appengine/hello-world.zip"
}

resource "google_app_engine_standard_app_version" "myapp_v1" {
version_id = "v1"
service = "myapp"
runtime = "nodejs10"
noop_on_destroy = true
entrypoint {
shell = "node ./app.js"
}
deployment {
zip {
source_url = "https://storage.googleapis.com/${google_storage_bucket.bucket.name}/hello-world.zip"
}
}
env_variables = {
port = "8080"
}
depends_on = ["google_storage_bucket_object.object"]

}

resource "google_app_engine_application_url_dispatch_rules" "service_rules" {
# project = "my-project"
dispatch_rules {
domain = "*"
path = "/default/*"
service = "default"
}
dispatch_rules {
domain = "*"
path = "/myapp/*"
service = "${google_app_engine_standard_app_version.myapp_v1.service}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func resourceComputeInstanceGroup() *schema.Resource {
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
Set: selfLinkRelativePathHash,
},

"named_port": {
Expand Down
3 changes: 3 additions & 0 deletions third_party/terraform/website-compiled/google.erb
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@
<li<%%= sidebar_current("docs-google-app-engine-standard-app-version") %>>
<a href="/docs/providers/google/r/app_engine_standard_app_version.html">google_app_engine_standard_app_version</a>
</li>
<li<%%= sidebar_current("docs-google-app-engine-application-url-dispatch-rules") %>>
<a href="/docs/providers/google/r/app_engine_application_url_dispatch_rules.html">google_app_engine_application_url_dispatch_rules</a>
</li>
</ul>
</li>

Expand Down

0 comments on commit 462605d

Please sign in to comment.