From d86f2790d5a834bd6f7068c9c97bf462de8a4e97 Mon Sep 17 00:00:00 2001 From: The Magician Date: Thu, 14 Sep 2023 10:09:20 -0400 Subject: [PATCH] Artifact Registry: implement VPC SC Config (#8787) (#15840) * Artifact Registry: implement VPC SC Config * Altering behavior from reset resource to simply drop resource * removing skip_test * re-adding skip_test since organization-level resources are out of scope for testing Signed-off-by: Modular Magician --- .changelog/8787.txt | 3 + ...tifact_registry_vpcsc_config.html.markdown | 101 ++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 .changelog/8787.txt create mode 100644 website/docs/r/artifact_registry_vpcsc_config.html.markdown diff --git a/.changelog/8787.txt b/.changelog/8787.txt new file mode 100644 index 00000000000..adcaa1ffef6 --- /dev/null +++ b/.changelog/8787.txt @@ -0,0 +1,3 @@ +```release-note:new-resource +`google_artifact_registry_vpcsc_config` +``` diff --git a/website/docs/r/artifact_registry_vpcsc_config.html.markdown b/website/docs/r/artifact_registry_vpcsc_config.html.markdown new file mode 100644 index 00000000000..7ad6bf6b364 --- /dev/null +++ b/website/docs/r/artifact_registry_vpcsc_config.html.markdown @@ -0,0 +1,101 @@ +--- +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** Type: MMv1 *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in +# .github/CONTRIBUTING.md. +# +# ---------------------------------------------------------------------------- +subcategory: "Artifact Registry" +description: |- + The Artifact Registry VPC SC config that applies to a Project. +--- + +# google\_artifact\_registry\_vpcsc\_config + +The Artifact Registry VPC SC config that applies to a Project. + +~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. +See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. + +To get more information about VPCSCConfig, see: + +* [API documentation](https://cloud.google.com/artifact-registry/docs/reference/rest/v1/VPCSCConfig) + +~> **Note:** VPC SC configs are automatically created for a given location. Creating a +resource of this type will acquire and update the resource that already +exists at the location. Deleting this resource will remove the config from +your Terraform state but leave the resource as is. +## Example Usage - Artifact Registry Vpcsc Config + + +```hcl +resource "google_artifact_registry_vpcsc_config" "my-config" { + provider = google-beta + location = "us-central1" + vpcsc_policy = "ALLOW" +} +``` + +## Argument Reference + +The following arguments are supported: + + + +- - - + + +* `vpcsc_policy` - + (Optional) + The VPC SC policy for project and location. + Possible values are: `DENY`, `ALLOW`. + +* `location` - + (Optional) + The name of the location this config is located in. + +* `project` - (Optional) The ID of the project in which the resource belongs. + If it is not provided, the provider project is used. + + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are exported: + +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/vpcscConfig` + +* `name` - + The name of the project's VPC SC Config. + Always of the form: projects/{project}/location/{location}/vpcscConfig + + +## Timeouts + +This resource provides the following +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: + +- `create` - Default is 20 minutes. +- `update` - Default is 20 minutes. +- `delete` - Default is 20 minutes. + +## Import + + +VPCSCConfig can be imported using any of these accepted formats: + +``` +$ terraform import google_artifact_registry_vpcsc_config.default projects/{{project}}/locations/{{location}}/vpcscConfig/{{name}} +$ terraform import google_artifact_registry_vpcsc_config.default {{project}}/{{location}}/{{name}} +$ terraform import google_artifact_registry_vpcsc_config.default {{location}}/{{name}} +``` + +## User Project Overrides + +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).