Skip to content

Commit

Permalink
add secret_manager resources and secret_version data source (#3007)…
Browse files Browse the repository at this point in the history
… (#5562)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jan 31, 2020
1 parent 2a5fac5 commit 15ebe23
Show file tree
Hide file tree
Showing 136 changed files with 3,223 additions and 3,168 deletions.
3 changes: 3 additions & 0 deletions .changelog/3007.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
secretmanager: added `secret` and `secret_version` resources and `secret_version` datasource
```
2 changes: 1 addition & 1 deletion google/data_source_monitoring_notification_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func dataSourceMonitoringNotificationChannelRead(d *schema.ResourceData, meta in
}
res := channels[0].(map[string]interface{})

name := flattenMonitoringNotificationChannelName(res["name"], d).(string)
name := flattenMonitoringNotificationChannelName(res["name"], d, config).(string)
d.Set("name", name)
d.SetId(name)

Expand Down
1 change: 1 addition & 0 deletions google/data_source_secret_manager_secret_version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package google
1 change: 1 addition & 0 deletions google/data_source_secret_manager_secret_version_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package google
24 changes: 12 additions & 12 deletions google/iam_binary_authorization_attestor_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ resource "google_container_analysis_note" "note" {
}
resource "google_binary_authorization_attestor_iam_member" "foo" {
project = "${google_binary_authorization_attestor.attestor.project}"
attestor = "${google_binary_authorization_attestor.attestor.name}"
project = google_binary_authorization_attestor.attestor.project
attestor = google_binary_authorization_attestor.attestor.name
role = "%{role}"
member = "user:[email protected]"
}
Expand Down Expand Up @@ -210,9 +210,9 @@ data "google_iam_policy" "foo" {
}
resource "google_binary_authorization_attestor_iam_policy" "foo" {
project = "${google_binary_authorization_attestor.attestor.project}"
attestor = "${google_binary_authorization_attestor.attestor.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
project = google_binary_authorization_attestor.attestor.project
attestor = google_binary_authorization_attestor.attestor.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand Down Expand Up @@ -259,9 +259,9 @@ data "google_iam_policy" "foo" {
}
resource "google_binary_authorization_attestor_iam_policy" "foo" {
project = "${google_binary_authorization_attestor.attestor.project}"
attestor = "${google_binary_authorization_attestor.attestor.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
project = google_binary_authorization_attestor.attestor.project
attestor = google_binary_authorization_attestor.attestor.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand Down Expand Up @@ -305,8 +305,8 @@ resource "google_container_analysis_note" "note" {
}
resource "google_binary_authorization_attestor_iam_binding" "foo" {
project = "${google_binary_authorization_attestor.attestor.project}"
attestor = "${google_binary_authorization_attestor.attestor.name}"
project = google_binary_authorization_attestor.attestor.project
attestor = google_binary_authorization_attestor.attestor.name
role = "%{role}"
members = ["user:[email protected]"]
}
Expand Down Expand Up @@ -352,8 +352,8 @@ resource "google_container_analysis_note" "note" {
}
resource "google_binary_authorization_attestor_iam_binding" "foo" {
project = "${google_binary_authorization_attestor.attestor.project}"
attestor = "${google_binary_authorization_attestor.attestor.name}"
project = google_binary_authorization_attestor.attestor.project
attestor = google_binary_authorization_attestor.attestor.name
role = "%{role}"
members = ["user:[email protected]", "user:[email protected]"]
}
Expand Down
34 changes: 17 additions & 17 deletions google/iam_cloud_functions_cloud_function_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ resource "google_cloudfunctions_function" "function" {
}
resource "google_cloudfunctions_function_iam_member" "foo" {
project = "${google_cloudfunctions_function.function.project}"
region = "${google_cloudfunctions_function.function.region}"
cloud_function = "${google_cloudfunctions_function.function.name}"
project = google_cloudfunctions_function.function.project
region = google_cloudfunctions_function.function.region
cloud_function = google_cloudfunctions_function.function.name
role = "%{role}"
member = "user:[email protected]"
}
Expand Down Expand Up @@ -188,10 +188,10 @@ data "google_iam_policy" "foo" {
}
resource "google_cloudfunctions_function_iam_policy" "foo" {
project = "${google_cloudfunctions_function.function.project}"
region = "${google_cloudfunctions_function.function.region}"
cloud_function = "${google_cloudfunctions_function.function.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
project = google_cloudfunctions_function.function.project
region = google_cloudfunctions_function.function.region
cloud_function = google_cloudfunctions_function.function.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand Down Expand Up @@ -225,10 +225,10 @@ data "google_iam_policy" "foo" {
}
resource "google_cloudfunctions_function_iam_policy" "foo" {
project = "${google_cloudfunctions_function.function.project}"
region = "${google_cloudfunctions_function.function.region}"
cloud_function = "${google_cloudfunctions_function.function.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
project = google_cloudfunctions_function.function.project
region = google_cloudfunctions_function.function.region
cloud_function = google_cloudfunctions_function.function.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand Down Expand Up @@ -259,9 +259,9 @@ resource "google_cloudfunctions_function" "function" {
}
resource "google_cloudfunctions_function_iam_binding" "foo" {
project = "${google_cloudfunctions_function.function.project}"
region = "${google_cloudfunctions_function.function.region}"
cloud_function = "${google_cloudfunctions_function.function.name}"
project = google_cloudfunctions_function.function.project
region = google_cloudfunctions_function.function.region
cloud_function = google_cloudfunctions_function.function.name
role = "%{role}"
members = ["user:[email protected]"]
}
Expand Down Expand Up @@ -294,9 +294,9 @@ resource "google_cloudfunctions_function" "function" {
}
resource "google_cloudfunctions_function_iam_binding" "foo" {
project = "${google_cloudfunctions_function.function.project}"
region = "${google_cloudfunctions_function.function.region}"
cloud_function = "${google_cloudfunctions_function.function.name}"
project = google_cloudfunctions_function.function.project
region = google_cloudfunctions_function.function.region
cloud_function = google_cloudfunctions_function.function.name
role = "%{role}"
members = ["user:[email protected]", "user:[email protected]"]
}
Expand Down
34 changes: 17 additions & 17 deletions google/iam_cloud_run_service_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ resource "google_cloud_run_service" "default" {
}
resource "google_cloud_run_service_iam_member" "foo" {
location = "${google_cloud_run_service.default.location}"
project = "${google_cloud_run_service.default.project}"
service = "${google_cloud_run_service.default.name}"
location = google_cloud_run_service.default.location
project = google_cloud_run_service.default.project
service = google_cloud_run_service.default.name
role = "%{role}"
member = "user:[email protected]"
}
Expand Down Expand Up @@ -178,10 +178,10 @@ data "google_iam_policy" "foo" {
}
resource "google_cloud_run_service_iam_policy" "foo" {
location = "${google_cloud_run_service.default.location}"
project = "${google_cloud_run_service.default.project}"
service = "${google_cloud_run_service.default.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
location = google_cloud_run_service.default.location
project = google_cloud_run_service.default.project
service = google_cloud_run_service.default.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand Down Expand Up @@ -210,10 +210,10 @@ data "google_iam_policy" "foo" {
}
resource "google_cloud_run_service_iam_policy" "foo" {
location = "${google_cloud_run_service.default.location}"
project = "${google_cloud_run_service.default.project}"
service = "${google_cloud_run_service.default.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
location = google_cloud_run_service.default.location
project = google_cloud_run_service.default.project
service = google_cloud_run_service.default.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand All @@ -239,9 +239,9 @@ resource "google_cloud_run_service" "default" {
}
resource "google_cloud_run_service_iam_binding" "foo" {
location = "${google_cloud_run_service.default.location}"
project = "${google_cloud_run_service.default.project}"
service = "${google_cloud_run_service.default.name}"
location = google_cloud_run_service.default.location
project = google_cloud_run_service.default.project
service = google_cloud_run_service.default.name
role = "%{role}"
members = ["user:[email protected]"]
}
Expand Down Expand Up @@ -269,9 +269,9 @@ resource "google_cloud_run_service" "default" {
}
resource "google_cloud_run_service_iam_binding" "foo" {
location = "${google_cloud_run_service.default.location}"
project = "${google_cloud_run_service.default.project}"
service = "${google_cloud_run_service.default.name}"
location = google_cloud_run_service.default.location
project = google_cloud_run_service.default.project
service = google_cloud_run_service.default.name
role = "%{role}"
members = ["user:[email protected]", "user:[email protected]"]
}
Expand Down
34 changes: 17 additions & 17 deletions google/iam_compute_instance_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ resource "google_compute_instance" "default" {
}
resource "google_compute_instance_iam_member" "foo" {
project = "${google_compute_instance.default.project}"
zone = "${google_compute_instance.default.zone}"
instance_name = "${google_compute_instance.default.name}"
project = google_compute_instance.default.project
zone = google_compute_instance.default.zone
instance_name = google_compute_instance.default.name
role = "%{role}"
member = "user:[email protected]"
}
Expand Down Expand Up @@ -171,10 +171,10 @@ data "google_iam_policy" "foo" {
}
resource "google_compute_instance_iam_policy" "foo" {
project = "${google_compute_instance.default.project}"
zone = "${google_compute_instance.default.zone}"
instance_name = "${google_compute_instance.default.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
project = google_compute_instance.default.project
zone = google_compute_instance.default.zone
instance_name = google_compute_instance.default.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand All @@ -201,10 +201,10 @@ data "google_iam_policy" "foo" {
}
resource "google_compute_instance_iam_policy" "foo" {
project = "${google_compute_instance.default.project}"
zone = "${google_compute_instance.default.zone}"
instance_name = "${google_compute_instance.default.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
project = google_compute_instance.default.project
zone = google_compute_instance.default.zone
instance_name = google_compute_instance.default.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand All @@ -228,9 +228,9 @@ resource "google_compute_instance" "default" {
}
resource "google_compute_instance_iam_binding" "foo" {
project = "${google_compute_instance.default.project}"
zone = "${google_compute_instance.default.zone}"
instance_name = "${google_compute_instance.default.name}"
project = google_compute_instance.default.project
zone = google_compute_instance.default.zone
instance_name = google_compute_instance.default.name
role = "%{role}"
members = ["user:[email protected]"]
}
Expand All @@ -256,9 +256,9 @@ resource "google_compute_instance" "default" {
}
resource "google_compute_instance_iam_binding" "foo" {
project = "${google_compute_instance.default.project}"
zone = "${google_compute_instance.default.zone}"
instance_name = "${google_compute_instance.default.name}"
project = google_compute_instance.default.project
zone = google_compute_instance.default.zone
instance_name = google_compute_instance.default.name
role = "%{role}"
members = ["user:[email protected]", "user:[email protected]"]
}
Expand Down
34 changes: 17 additions & 17 deletions google/iam_compute_subnetwork_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ resource "google_compute_network" "custom-test" {
}
resource "google_compute_subnetwork_iam_member" "foo" {
project = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.project}"
region = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.region}"
subnetwork = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.name}"
project = google_compute_subnetwork.network-with-private-secondary-ip-ranges.project
region = google_compute_subnetwork.network-with-private-secondary-ip-ranges.region
subnetwork = google_compute_subnetwork.network-with-private-secondary-ip-ranges.name
role = "%{role}"
member = "user:[email protected]"
}
Expand Down Expand Up @@ -171,10 +171,10 @@ data "google_iam_policy" "foo" {
}
resource "google_compute_subnetwork_iam_policy" "foo" {
project = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.project}"
region = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.region}"
subnetwork = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
project = google_compute_subnetwork.network-with-private-secondary-ip-ranges.project
region = google_compute_subnetwork.network-with-private-secondary-ip-ranges.region
subnetwork = google_compute_subnetwork.network-with-private-secondary-ip-ranges.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand All @@ -201,10 +201,10 @@ data "google_iam_policy" "foo" {
}
resource "google_compute_subnetwork_iam_policy" "foo" {
project = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.project}"
region = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.region}"
subnetwork = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.name}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
project = google_compute_subnetwork.network-with-private-secondary-ip-ranges.project
region = google_compute_subnetwork.network-with-private-secondary-ip-ranges.region
subnetwork = google_compute_subnetwork.network-with-private-secondary-ip-ranges.name
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand All @@ -228,9 +228,9 @@ resource "google_compute_network" "custom-test" {
}
resource "google_compute_subnetwork_iam_binding" "foo" {
project = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.project}"
region = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.region}"
subnetwork = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.name}"
project = google_compute_subnetwork.network-with-private-secondary-ip-ranges.project
region = google_compute_subnetwork.network-with-private-secondary-ip-ranges.region
subnetwork = google_compute_subnetwork.network-with-private-secondary-ip-ranges.name
role = "%{role}"
members = ["user:[email protected]"]
}
Expand All @@ -256,9 +256,9 @@ resource "google_compute_network" "custom-test" {
}
resource "google_compute_subnetwork_iam_binding" "foo" {
project = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.project}"
region = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.region}"
subnetwork = "${google_compute_subnetwork.network-with-private-secondary-ip-ranges.name}"
project = google_compute_subnetwork.network-with-private-secondary-ip-ranges.project
region = google_compute_subnetwork.network-with-private-secondary-ip-ranges.region
subnetwork = google_compute_subnetwork.network-with-private-secondary-ip-ranges.name
role = "%{role}"
members = ["user:[email protected]", "user:[email protected]"]
}
Expand Down
4 changes: 2 additions & 2 deletions google/iam_iap_app_engine_service_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ resource "google_iap_app_engine_service_iam_policy" "foo" {
project = "${google_app_engine_standard_app_version.version.project}"
app_id = "${google_app_engine_standard_app_version.version.project}"
service = "${google_app_engine_standard_app_version.version.service}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand Down Expand Up @@ -321,7 +321,7 @@ resource "google_iap_app_engine_service_iam_policy" "foo" {
project = "${google_app_engine_standard_app_version.version.project}"
app_id = "${google_app_engine_standard_app_version.version.project}"
service = "${google_app_engine_standard_app_version.version.service}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand Down
4 changes: 2 additions & 2 deletions google/iam_iap_app_engine_version_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ resource "google_iap_app_engine_version_iam_policy" "foo" {
app_id = "${google_app_engine_standard_app_version.version.project}"
service = "${google_app_engine_standard_app_version.version.service}"
version_id = "${google_app_engine_standard_app_version.version.version_id}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand Down Expand Up @@ -243,7 +243,7 @@ resource "google_iap_app_engine_version_iam_policy" "foo" {
app_id = "${google_app_engine_standard_app_version.version.project}"
service = "${google_app_engine_standard_app_version.version.service}"
version_id = "${google_app_engine_standard_app_version.version.version_id}"
policy_data = "${data.google_iam_policy.foo.policy_data}"
policy_data = data.google_iam_policy.foo.policy_data
}
`, context)
}
Expand Down
Loading

0 comments on commit 15ebe23

Please sign in to comment.