This repository has been archived by the owner on May 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for google_compute_ssl_policy (#5486) (#407)
* Add a resource mapping for google_compute_ssl_policy * add test data files Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
4e2b4d5
commit 4d31a15
Showing
6 changed files
with
183 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
{ | ||
"name": "//compute.googleapis.com/projects/{{.Provider.project}}/global/sslPolicies/custom-ssl-policy", | ||
"asset_type": "compute.googleapis.com/SslPolicy", | ||
"ancestry_path": "{{.Ancestry}}/project/{{.Provider.project}}", | ||
"resource": { | ||
"version": "v1", | ||
"discovery_document_uri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", | ||
"discovery_name": "SslPolicy", | ||
"parent": "//cloudresourcemanager.googleapis.com/projects/{{.Provider.project}}", | ||
"data": { | ||
"customFeatures": [ | ||
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", | ||
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" | ||
], | ||
"minTlsVersion": "TLS_1_2", | ||
"name": "custom-ssl-policy", | ||
"profile": "CUSTOM" | ||
} | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright 2021 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
terraform { | ||
required_providers { | ||
google = { | ||
source = "hashicorp/google" | ||
version = "~> {{.Provider.version}}" | ||
} | ||
} | ||
} | ||
|
||
provider "google" { | ||
{{if .Provider.credentials }}credentials = "{{.Provider.credentials}}"{{end}} | ||
} | ||
|
||
resource "google_compute_ssl_policy" "custom-ssl-policy" { | ||
name = "custom-ssl-policy" | ||
min_tls_version = "TLS_1_2" | ||
profile = "CUSTOM" | ||
custom_features = ["TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"] | ||
} |
123 changes: 123 additions & 0 deletions
123
testdata/templates/example_compute_ssl_policy.tfplan.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{ | ||
"format_version": "0.2", | ||
"terraform_version": "1.0.10", | ||
"planned_values": { | ||
"root_module": { | ||
"resources": [ | ||
{ | ||
"address": "google_compute_ssl_policy.custom-ssl-policy", | ||
"mode": "managed", | ||
"type": "google_compute_ssl_policy", | ||
"name": "custom-ssl-policy", | ||
"provider_name": "registry.terraform.io/hashicorp/google", | ||
"schema_version": 0, | ||
"values": { | ||
"custom_features": [ | ||
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", | ||
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" | ||
], | ||
"description": null, | ||
"min_tls_version": "TLS_1_2", | ||
"name": "custom-ssl-policy", | ||
"profile": "CUSTOM", | ||
"timeouts": null | ||
}, | ||
"sensitive_values": { | ||
"custom_features": [ | ||
false, | ||
false | ||
], | ||
"enabled_features": [] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"resource_changes": [ | ||
{ | ||
"address": "google_compute_ssl_policy.custom-ssl-policy", | ||
"mode": "managed", | ||
"type": "google_compute_ssl_policy", | ||
"name": "custom-ssl-policy", | ||
"provider_name": "registry.terraform.io/hashicorp/google", | ||
"change": { | ||
"actions": [ | ||
"create" | ||
], | ||
"before": null, | ||
"after": { | ||
"custom_features": [ | ||
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", | ||
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" | ||
], | ||
"description": null, | ||
"min_tls_version": "TLS_1_2", | ||
"name": "custom-ssl-policy", | ||
"profile": "CUSTOM", | ||
"timeouts": null | ||
}, | ||
"after_unknown": { | ||
"creation_timestamp": true, | ||
"custom_features": [ | ||
false, | ||
false | ||
], | ||
"enabled_features": true, | ||
"fingerprint": true, | ||
"id": true, | ||
"project": true, | ||
"self_link": true | ||
}, | ||
"before_sensitive": false, | ||
"after_sensitive": { | ||
"custom_features": [ | ||
false, | ||
false | ||
], | ||
"enabled_features": [] | ||
} | ||
} | ||
} | ||
], | ||
"configuration": { | ||
"provider_config": { | ||
"google": { | ||
"name": "google", | ||
"expressions": { | ||
"project": { | ||
"constant_value": "{{.Provider.project}}" | ||
} | ||
} | ||
} | ||
}, | ||
"root_module": { | ||
"resources": [ | ||
{ | ||
"address": "google_compute_ssl_policy.custom-ssl-policy", | ||
"mode": "managed", | ||
"type": "google_compute_ssl_policy", | ||
"name": "custom-ssl-policy", | ||
"provider_config_key": "google", | ||
"expressions": { | ||
"custom_features": { | ||
"constant_value": [ | ||
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", | ||
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" | ||
] | ||
}, | ||
"min_tls_version": { | ||
"constant_value": "TLS_1_2" | ||
}, | ||
"name": { | ||
"constant_value": "custom-ssl-policy" | ||
}, | ||
"profile": { | ||
"constant_value": "CUSTOM" | ||
} | ||
}, | ||
"schema_version": 0 | ||
} | ||
] | ||
} | ||
} | ||
} |