diff --git a/.changelog/9100.txt b/.changelog/9100.txt new file mode 100644 index 0000000000..8ec013c069 --- /dev/null +++ b/.changelog/9100.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/website/docs/r/container_cluster.html.markdown b/website/docs/r/container_cluster.html.markdown index ba2666ef32..b0e3c15fbb 100644 --- a/website/docs/r/container_cluster.html.markdown +++ b/website/docs/r/container_cluster.html.markdown @@ -1338,12 +1338,27 @@ This resource provides the following GKE clusters can be imported using the `project` , `location`, and `name`. If the project is omitted, the default provider value will be used. Examples: +* `projects/{{project_id}}/locations/{{location}}/clusters/{{cluster_id}}` +* `{{project_id}}/{{location}}/{{cluster_id}}` +* `{{location}}/{{cluster_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import GKE clusters using one of the formats above. For example: + +```tf +import { + id = "projects/{{project_id}}/locations/{{location}}/clusters/{{cluster_id}}" + to = google_container_cluster.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), GKE clusters can be imported using one of the formats above. For example: + ``` -$ terraform import google_container_cluster.mycluster projects/my-gcp-project/locations/us-east1-a/clusters/my-cluster +$ terraform import google_container_cluster.default projects/{{project_id}}/locations/{{location}}/clusters/{{cluster_id}} -$ terraform import google_container_cluster.mycluster my-gcp-project/us-east1-a/my-cluster +$ terraform import google_container_cluster.default {{project_id}}/{{location}}/{{cluster_id}} -$ terraform import google_container_cluster.mycluster us-east1-a/my-cluster +$ terraform import google_container_cluster.default {{location}}/{{cluster_id}} ``` ~> **Note:** This resource has several fields that control Terraform-specific behavior and aren't present in the API. If they are set in config and you import a cluster, Terraform may need to perform an update immediately after import. Most of these updates should be no-ops but some may modify your cluster if the imported state differs. diff --git a/website/docs/r/container_node_pool.html.markdown b/website/docs/r/container_node_pool.html.markdown index bbf814662a..c0e7fb8a90 100644 --- a/website/docs/r/container_node_pool.html.markdown +++ b/website/docs/r/container_node_pool.html.markdown @@ -300,8 +300,22 @@ In addition to the arguments listed above, the following computed attributes are Node pools can be imported using the `project`, `location`, `cluster` and `name`. If the project is omitted, the project value in the provider configuration will be used. Examples: +* `{{project_id}}/{{location}}/{{cluster_id}}/{{pool_id}}` +* `{{location}}/{{cluster_id}}/{{pool_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import node pools using one of the formats above. For example: + +```tf +import { + id = "{{project_id}}/{{location}}/{{cluster_id}}/{{pool_id}}" + to = google_container_node_pool.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), node pools can be imported using one of the formats above. For example: + ``` -$ terraform import google_container_node_pool.mainpool my-gcp-project/us-east1-a/my-cluster/main-pool +$ terraform import google_container_node_pool.default {{project_id}}/{{location}}/{{cluster_id}}/{{pool_id}} -$ terraform import google_container_node_pool.mainpool us-east1/my-cluster/main-pool +$ terraform import google_container_node_pool.default {{location}}/{{cluster_id}}/{{pool_id}} ``` diff --git a/website/docs/r/dataflow_job.html.markdown b/website/docs/r/dataflow_job.html.markdown index a3acbcfcaa..b33badf778 100644 --- a/website/docs/r/dataflow_job.html.markdown +++ b/website/docs/r/dataflow_job.html.markdown @@ -133,6 +133,19 @@ The following arguments are supported: Dataflow jobs can be imported using the job `id` e.g. +* `{{id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import dataflow jobs using one of the formats above. For example: + +```tf +import { + id = "{{id}}" + to = google_dataflow_job.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), dataflow jobs can be imported using one of the formats above. For example: + ``` -$ terraform import google_dataflow_job.example 2022-07-31_06_25_42-11926927532632678660 +$ terraform import google_dataflow_job.default {{id}} ``` diff --git a/website/docs/r/dataproc_workflow_template.html.markdown b/website/docs/r/dataproc_workflow_template.html.markdown index 028b6eaaba..da170d905d 100644 --- a/website/docs/r/dataproc_workflow_template.html.markdown +++ b/website/docs/r/dataproc_workflow_template.html.markdown @@ -962,6 +962,21 @@ This resource provides the following WorkflowTemplate can be imported using any of these accepted formats: +* `projects/{{project}}/locations/{{location}}/workflowTemplates/{{name}}` +* `{{project}}/{{location}}/{{name}}` +* `{{location}}/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import WorkflowTemplate using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/workflowTemplates/{{name}}" + to = google_dataproc_workflow_template.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), WorkflowTemplate can be imported using one of the formats above. For example: + ``` $ terraform import google_dataproc_workflow_template.default projects/{{project}}/locations/{{location}}/workflowTemplates/{{name}} $ terraform import google_dataproc_workflow_template.default {{project}}/{{location}}/{{name}} diff --git a/website/docs/r/dialogflow_cx_environment.html.markdown b/website/docs/r/dialogflow_cx_environment.html.markdown index fe119169bf..ee3b70d03b 100644 --- a/website/docs/r/dialogflow_cx_environment.html.markdown +++ b/website/docs/r/dialogflow_cx_environment.html.markdown @@ -118,6 +118,20 @@ This resource provides the following Environment can be imported using any of these accepted formats: +* `{{parent}}/environments/{{name}}` +* `{{parent}}/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Environment using one of the formats above. For example: + +```tf +import { + id = "{{parent}}/environments/{{name}}" + to = google_dialogflow_cx_environment.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Environment can be imported using one of the formats above. For example: + ``` $ terraform import google_dialogflow_cx_environment.default {{parent}}/environments/{{name}} $ terraform import google_dialogflow_cx_environment.default {{parent}}/{{name}} diff --git a/website/docs/r/dialogflow_cx_version.html.markdown b/website/docs/r/dialogflow_cx_version.html.markdown index a20ebb427c..8271db10a1 100644 --- a/website/docs/r/dialogflow_cx_version.html.markdown +++ b/website/docs/r/dialogflow_cx_version.html.markdown @@ -126,9 +126,22 @@ This resource provides the following ## Import - Version can be imported using any of these accepted formats: +* `{{parent}}/versions/{{name}}` +* `{{parent}}/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Version using one of the formats above. For example: + +```tf +import { + id = "{{parent}}/versions/{{name}}" + to = google_dialogflow_cx_version.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Version can be imported using one of the formats above. For example: + ``` $ terraform import google_dialogflow_cx_version.default {{parent}}/versions/{{name}} $ terraform import google_dialogflow_cx_version.default {{parent}}/{{name}} diff --git a/website/docs/r/dns_record_set.html.markdown b/website/docs/r/dns_record_set.html.markdown index 05aed34e8b..d4823cb788 100644 --- a/website/docs/r/dns_record_set.html.markdown +++ b/website/docs/r/dns_record_set.html.markdown @@ -341,10 +341,25 @@ The following arguments are supported: DNS record sets can be imported using either of these accepted formats: +* `projects/{{project}}/managedZones/{{zone}}/rrsets/{{name}}/{{type}}` +* `{{project}}/{{zone}}/{{name}}/{{type}}` +* `{{zone}}/{{name}}/{{type}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import DNS record sets using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/managedZones/{{zone}}/rrsets/{{name}}/{{type}}" + to = google_dns_record_set.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), DNS record sets can be imported using one of the formats above. For example: + ``` -$ terraform import google_dns_record_set.frontend projects/{{project}}/managedZones/{{zone}}/rrsets/{{name}}/{{type}} -$ terraform import google_dns_record_set.frontend {{project}}/{{zone}}/{{name}}/{{type}} -$ terraform import google_dns_record_set.frontend {{zone}}/{{name}}/{{type}} +$ terraform import google_dns_record_set.default projects/{{project}}/managedZones/{{zone}}/rrsets/{{name}}/{{type}} +$ terraform import google_dns_record_set.default {{project}}/{{zone}}/{{name}}/{{type}} +$ terraform import google_dns_record_set.default {{zone}}/{{name}}/{{type}} ``` Note: The record name must include the trailing dot at the end. diff --git a/website/docs/r/gke_hub_feature_membership.html.markdown b/website/docs/r/gke_hub_feature_membership.html.markdown index 3c3b24c570..9d45db679f 100644 --- a/website/docs/r/gke_hub_feature_membership.html.markdown +++ b/website/docs/r/gke_hub_feature_membership.html.markdown @@ -361,6 +361,21 @@ This resource provides the following FeatureMembership can be imported using any of these accepted formats: +* `projects/{{project}}/locations/{{location}}/features/{{feature}}/membershipId/{{membership}}` +* `{{project}}/{{location}}/{{feature}}/{{membership}}` +* `{{location}}/{{feature}}/{{membership}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import FeatureMembership using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/features/{{feature}}/membershipId/{{membership}}" + to = google_gke_hub_feature_membership.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), FeatureMembership can be imported using one of the formats above. For example: + ``` $ terraform import google_gke_hub_feature_membership.default projects/{{project}}/locations/{{location}}/features/{{feature}}/membershipId/{{membership}} $ terraform import google_gke_hub_feature_membership.default {{project}}/{{location}}/{{feature}}/{{membership}} diff --git a/website/docs/r/google_billing_subaccount.html.markdown b/website/docs/r/google_billing_subaccount.html.markdown index c28d3d3ed0..abe79ebf90 100644 --- a/website/docs/r/google_billing_subaccount.html.markdown +++ b/website/docs/r/google_billing_subaccount.html.markdown @@ -42,6 +42,19 @@ The following additional attributes are exported: Billing Subaccounts can be imported using any of these accepted formats: +* `billingAccounts/{billing_account_id}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Billing Subaccounts using one of the formats above. For example: + +```tf +import { + id = "billingAccounts/{billing_account_id}" + to = google_billing_subaccount.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Billing Subaccounts can be imported using one of the formats above. For example: + ``` $ terraform import google_billing_subaccount.default billingAccounts/{billing_account_id} ``` diff --git a/website/docs/r/google_folder.html.markdown b/website/docs/r/google_folder.html.markdown index 91d3e4a4ec..3c5dc24c47 100644 --- a/website/docs/r/google_folder.html.markdown +++ b/website/docs/r/google_folder.html.markdown @@ -61,8 +61,21 @@ exported: Folders can be imported using the folder's id, e.g. +* `folders/{{folder_id}}` +* `{{folder_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Folders using one of the formats above. For example: + +```tf +import { + id = "folders/{{folder_id}}" + to = google_folder.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Folders can be imported using one of the formats above. For example: + ``` -# Both syntaxes are valid -$ terraform import google_folder.department1 1234567 -$ terraform import google_folder.department1 folders/1234567 +$ terraform import google_folder.default {{folder_id}} +$ terraform import google_folder.default folders/{{folder_id}} ``` diff --git a/website/docs/r/google_folder_organization_policy.html.markdown b/website/docs/r/google_folder_organization_policy.html.markdown index 88bcb75427..bff1618dfd 100644 --- a/website/docs/r/google_folder_organization_policy.html.markdown +++ b/website/docs/r/google_folder_organization_policy.html.markdown @@ -138,7 +138,21 @@ exported: Folder organization policies can be imported using any of the follow formats: +* `folders/{{folder_id}}/constraints/serviceuser.services` +* `{{folder_id}}/serviceuser.services` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import folder organization policies using one of the formats above. For example: + +```tf +import { + id = "folders/{{folder_id}}/constraints/serviceuser.services" + to = google_folder_organization_policy.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), folder organization policies can be imported using one of the formats above. For example: + ``` -$ terraform import google_folder_organization_policy.policy folders/folder-1234/constraints/serviceuser.services -$ terraform import google_folder_organization_policy.policy folder-1234/serviceuser.services +* `$ terraform import google_folder_organization_policy.default folders/* ``{{folder_id}}/constraints/serviceuser.services` +* `* `$ terraform import google_folder_organization_policy.default {{folder_id}}/``serviceuser.services ``` diff --git a/website/docs/r/google_organization_policy.html.markdown b/website/docs/r/google_organization_policy.html.markdown index 1aa2c2d43f..94350af6f2 100644 --- a/website/docs/r/google_organization_policy.html.markdown +++ b/website/docs/r/google_organization_policy.html.markdown @@ -137,8 +137,21 @@ exported: Organization Policies can be imported using the `org_id` and the `constraint`, e.g. +* `{{org_id}}/constraints/{{constraint}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Organization Policies using one of the formats above. For example: + +```tf +import { + id = "{{org_id}}/constraints/{{constraint}}" + to = google_organization_policy.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Organization Policies can be imported using one of the formats above. For example: + ``` -$ terraform import google_organization_policy.services_policy 123456789/constraints/serviceuser.services +$ terraform import google_organization_policy.default {{org_id}}/constraints/{{constraint}} ``` It is all right if the constraint contains a slash, as in the example above. diff --git a/website/docs/r/google_project.html.markdown b/website/docs/r/google_project.html.markdown index 1f3a4dff83..8972fdeecb 100644 --- a/website/docs/r/google_project.html.markdown +++ b/website/docs/r/google_project.html.markdown @@ -120,6 +120,19 @@ This resource provides the following Projects can be imported using the `project_id`, e.g. +* `{{project_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Projects using one of the formats above. For example: + +```tf +import { + id = "{{project_id}}" + to = google_project.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Projects can be imported using one of the formats above. For example: + ``` -$ terraform import google_project.my_project your-project-id +$ terraform import google_project.default {{project_id}} ``` diff --git a/website/docs/r/google_project_iam_custom_role.html.markdown b/website/docs/r/google_project_iam_custom_role.html.markdown index 33af6c36e9..a703f4cb76 100644 --- a/website/docs/r/google_project_iam_custom_role.html.markdown +++ b/website/docs/r/google_project_iam_custom_role.html.markdown @@ -63,9 +63,23 @@ exported: ## Import - Custom Roles can be imported using any of these accepted formats: +* `projects/{{project}}/roles/{{role_id}}` +* `{{project}}/{{role_id}}` +* `{{role_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Custom Roles using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/roles/{{role_id}}" + to = google_project_iam_custom_role.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Custom Roles can be imported using one of the formats above. For example: + ``` $ terraform import google_project_iam_custom_role.default projects/{{project}}/roles/{{role_id}} $ terraform import google_project_iam_custom_role.default {{project}}/{{role_id}} diff --git a/website/docs/r/google_project_organization_policy.html.markdown b/website/docs/r/google_project_organization_policy.html.markdown index 51fba389fe..79547d1257 100644 --- a/website/docs/r/google_project_organization_policy.html.markdown +++ b/website/docs/r/google_project_organization_policy.html.markdown @@ -137,8 +137,23 @@ exported: Project organization policies can be imported using any of the follow formats: +* `projects/{{project_id}}:constraints/{{constraint}}` +* `{{project_id}}:constraints/{{constraint}}` +* `{{project_id}}:{{constraint}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import project organization policies using one of the formats above. For example: + +```tf +import { + id = "projects/{{project_id}}:constraints/{{constraint}}" + to = google_project_organization_policy.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), project organization policies can be imported using one of the formats above. For example: + ``` -$ terraform import google_project_organization_policy.policy projects/test-project:constraints/serviceuser.services -$ terraform import google_project_organization_policy.policy test-project:constraints/serviceuser.services -$ terraform import google_project_organization_policy.policy test-project:serviceuser.services +$ terraform import google_project_organization_policy.default projects/{{project_id}}:constraints/{{constraint}} +$ terraform import google_project_organization_policy.default {{project_id}}:constraints/{{constraint}} +$ terraform import google_project_organization_policy.default {{project_id}}:{{constraint}} ``` diff --git a/website/docs/r/google_project_service.html.markdown b/website/docs/r/google_project_service.html.markdown index 2099eb4e09..0347f5f460 100644 --- a/website/docs/r/google_project_service.html.markdown +++ b/website/docs/r/google_project_service.html.markdown @@ -76,8 +76,21 @@ This resource provides the following Project services can be imported using the `project_id` and `service`, e.g. +* `{{project_id}}/{{service}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import project services using one of the formats above. For example: + +```tf +import { + id = "{{project_id}}/{{service}}" + to = google_project_service.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), project services can be imported using one of the formats above. For example: + ``` -$ terraform import google_project_service.my_project your-project-id/iam.googleapis.com +$ terraform import google_project_service.default {{project_id}}/{{service}} ``` Note that unlike other resources that fail if they already exist, diff --git a/website/docs/r/google_service_account.html.markdown b/website/docs/r/google_service_account.html.markdown index d39b86fc40..95a409bc8b 100644 --- a/website/docs/r/google_service_account.html.markdown +++ b/website/docs/r/google_service_account.html.markdown @@ -79,6 +79,19 @@ This resource provides the following Service accounts can be imported using their URI, e.g. +* `projects/{{project_id}}/serviceAccounts/{{email}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import service accounts using one of the formats above. For example: + +```tf +import { + id = "projects/{{project_id}}/serviceAccounts/{{email}}" + to = google_service_account.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), service accounts can be imported using one of the formats above. For example: + ``` -$ terraform import google_service_account.my_sa projects/my-project/serviceAccounts/my-sa@my-project.iam.gserviceaccount.com +$ terraform import google_service_account.default projects/{{project_id}}/serviceAccounts/{{email}} ``` diff --git a/website/docs/r/google_service_networking_peered_dns_domain.html.markdown b/website/docs/r/google_service_networking_peered_dns_domain.html.markdown index 3c8fb0f250..1d72c6e721 100644 --- a/website/docs/r/google_service_networking_peered_dns_domain.html.markdown +++ b/website/docs/r/google_service_networking_peered_dns_domain.html.markdown @@ -56,19 +56,31 @@ This resource provides the following ## Import -Project peered DNS domains can be imported using the `service`, `project`, `network` and `name`, e.g. - -``` -$ terraform import google_service_networking_peered_dns_domain.my_domain services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name} -``` - -Where: +Project peered DNS domains can be imported using the `service`, `project`, `network` and `name`, where: - `service` is the service connection, defaults to `servicenetworking.googleapis.com`. - `project` is the producer project name. - `network` is the consumer network name. - `name` is the name of your peered DNS domain. +* `services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import project peered DNS domains using one of the formats above. For example: + +```tf +import { + id = "services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name}" + to = google_service_networking_peered_dns_domain.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), project peered DNS domains can be imported using one of the formats above. For example: + +``` +$ terraform import google_service_networking_peered_dns_domain.default services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{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). diff --git a/website/docs/r/google_tags_location_tag_binding.html.markdown b/website/docs/r/google_tags_location_tag_binding.html.markdown index 924ab23d28..1787e36966 100644 --- a/website/docs/r/google_tags_location_tag_binding.html.markdown +++ b/website/docs/r/google_tags_location_tag_binding.html.markdown @@ -116,6 +116,19 @@ This resource provides the following LocationTagBinding can be imported using any of these accepted formats: +* `{{location}}/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import TagBinding using one of the formats above. For example: + +```tf +import { + id = "{{location}}/{{name}}" + to = google_tags_location_tag_binding.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), TagBinding can be imported using one of the formats above. For example: + ``` $ terraform import google_tags_location_tag_binding.default {{location}}/{{name}} ``` diff --git a/website/docs/r/logging_billing_account_bucket_config.html.markdown b/website/docs/r/logging_billing_account_bucket_config.html.markdown index 90c5ac1285..808490d871 100644 --- a/website/docs/r/logging_billing_account_bucket_config.html.markdown +++ b/website/docs/r/logging_billing_account_bucket_config.html.markdown @@ -56,6 +56,19 @@ exported: This resource can be imported using the following format: +* `billingAccounts/{{billingAccount}}/locations/{{location}}/buckets/{{bucket_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import this resource using one of the formats above. For example: + +```tf +import { + id = "billingAccounts/{{billingAccount}}/locations/{{location}}/buckets/{{bucket_id}}" + to = google_logging_billing_account_bucket_config.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), this resource can be imported using one of the formats above. For example: + ``` $ terraform import google_logging_billing_account_bucket_config.default billingAccounts/{{billingAccount}}/locations/{{location}}/buckets/{{bucket_id}} ``` diff --git a/website/docs/r/logging_billing_account_exclusion.html.markdown b/website/docs/r/logging_billing_account_exclusion.html.markdown index 9057b452c8..ac55ca17f2 100644 --- a/website/docs/r/logging_billing_account_exclusion.html.markdown +++ b/website/docs/r/logging_billing_account_exclusion.html.markdown @@ -55,6 +55,19 @@ In addition to the arguments listed above, the following computed attributes are Billing account logging exclusions can be imported using their URI, e.g. +* `billingAccounts/{{billing_account}}/exclusions/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import billing account logging exclusions using one of the formats above. For example: + +```tf +import { + id = "billingAccounts/{{billing_account}}/exclusions/{{name}}" + to = google_logging_billing_account_exclusion.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), billing account logging exclusions can be imported using one of the formats above. For example: + ``` -$ terraform import google_logging_billing_account_exclusion.my_exclusion billingAccounts/my-billing_account/exclusions/my-exclusion +$ terraform import google_logging_billing_account_exclusion.default billingAccounts/{{billing_account}}/exclusions/{{name}} ``` diff --git a/website/docs/r/logging_billing_account_sink.html.markdown b/website/docs/r/logging_billing_account_sink.html.markdown index a2a78c2a0a..eb7749cb84 100644 --- a/website/docs/r/logging_billing_account_sink.html.markdown +++ b/website/docs/r/logging_billing_account_sink.html.markdown @@ -101,6 +101,19 @@ exported: Billing account logging sinks can be imported using this format: +* `billingAccounts/{{billing_account_id}}/sinks/{{sink_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import billing account logging sinks using one of the formats above. For example: + +```tf +import { + id = "billingAccounts/{{billing_account_id}}/sinks/{{sink_id}}" + to = google_logging_billing_account_sink.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), billing account logging sinks can be imported using one of the formats above. For example: + ``` -$ terraform import google_logging_billing_account_sink.my_sink billingAccounts/{{billing_account_id}}/sinks/{{sink_id}} +$ terraform import google_logging_billing_account_sink.default billingAccounts/{{billing_account_id}}/sinks/{{sink_id}} ``` diff --git a/website/docs/r/logging_folder_bucket_config.html.markdown b/website/docs/r/logging_folder_bucket_config.html.markdown index 7fa39b27eb..ab32ce7925 100644 --- a/website/docs/r/logging_folder_bucket_config.html.markdown +++ b/website/docs/r/logging_folder_bucket_config.html.markdown @@ -57,6 +57,19 @@ exported: This resource can be imported using the following format: +* `folders/{{folder}}/locations/{{location}}/buckets/{{bucket_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import this resource using one of the formats above. For example: + +```tf +import { + id = "folders/{{folder}}/locations/{{location}}/buckets/{{bucket_id}}" + to = google_logging_folder_bucket_config.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), this resource can be imported using one of the formats above. For example: + ``` $ terraform import google_logging_folder_bucket_config.default folders/{{folder}}/locations/{{location}}/buckets/{{bucket_id}} ``` diff --git a/website/docs/r/logging_folder_exclusion.html.markdown b/website/docs/r/logging_folder_exclusion.html.markdown index f3cd9d4818..3a1f8c9694 100644 --- a/website/docs/r/logging_folder_exclusion.html.markdown +++ b/website/docs/r/logging_folder_exclusion.html.markdown @@ -61,6 +61,19 @@ In addition to the arguments listed above, the following computed attributes are Folder-level logging exclusions can be imported using their URI, e.g. +* `folders/{{folder}}/exclusions/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import folder-level logging exclusions using one of the formats above. For example: + +```tf +import { + id = "folders/{{folder}}/exclusions/{{name}}" + to = google_logging_folder_exclusion.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), folder-level logging exclusions can be imported using one of the formats above. For example: + ``` -$ terraform import google_logging_folder_exclusion.my_exclusion folders/my-folder/exclusions/my-exclusion +$ terraform import google_logging_folder_exclusion.default folders/{{folder}}/exclusions/{{name}} ``` diff --git a/website/docs/r/logging_folder_sink.html.markdown b/website/docs/r/logging_folder_sink.html.markdown index dd0f20f63b..ee10b92e49 100644 --- a/website/docs/r/logging_folder_sink.html.markdown +++ b/website/docs/r/logging_folder_sink.html.markdown @@ -110,6 +110,19 @@ exported: Folder-level logging sinks can be imported using this format: +* `folders/{{folder_id}}/sinks/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import folder-level logging sinks using one of the formats above. For example: + +```tf +import { + id = "folders/{{folder_id}}/sinks/{{name}}" + to = google_logging_folder_sink.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), folder-level logging sinks can be imported using one of the formats above. For example: + ``` -$ terraform import google_logging_folder_sink.my_sink folders/{{folder_id}}/sinks/{{name}} +$ terraform import google_logging_folder_sink.default folders/{{folder_id}}/sinks/{{name}} ``` diff --git a/website/docs/r/logging_organization_bucket_config.html.markdown b/website/docs/r/logging_organization_bucket_config.html.markdown index b8f7b760ee..ceb8026e7b 100644 --- a/website/docs/r/logging_organization_bucket_config.html.markdown +++ b/website/docs/r/logging_organization_bucket_config.html.markdown @@ -54,9 +54,21 @@ exported: ## Import - This resource can be imported using the following format: +* `organizations/{{organization}}/locations/{{location}}/buckets/{{bucket_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import this resource using one of the formats above. For example: + +```tf +import { + id = "organizations/{{organization}}/locations/{{location}}/buckets/{{bucket_id}}" + to = google_logging_organization_bucket_config.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), this resource can be imported using one of the formats above. For example: + ``` $ terraform import google_logging_organization_bucket_config.default organizations/{{organization}}/locations/{{location}}/buckets/{{bucket_id}} ``` diff --git a/website/docs/r/logging_organization_exclusion.html.markdown b/website/docs/r/logging_organization_exclusion.html.markdown index 072cbd6431..539daa01d5 100644 --- a/website/docs/r/logging_organization_exclusion.html.markdown +++ b/website/docs/r/logging_organization_exclusion.html.markdown @@ -55,6 +55,19 @@ In addition to the arguments listed above, the following computed attributes are Organization-level logging exclusions can be imported using their URI, e.g. +* `organizations/{{organization}}/exclusions/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import organization-level logging exclusions using one of the formats above. For example: + +```tf +import { + id = "organizations/{{organization}}/exclusions/{{name}}" + to = google_logging_organization_exclusion.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), organization-level logging exclusions can be imported using one of the formats above. For example: + ``` -$ terraform import google_logging_organization_exclusion.my_exclusion organizations/{{organization}}/exclusions/{{name}} +$ terraform import google_logging_organization_exclusion.default organizations/{{organization}}/exclusions/{{name}} ``` diff --git a/website/docs/r/logging_organization_sink.html.markdown b/website/docs/r/logging_organization_sink.html.markdown index 6fb564a37a..b0ebf3646f 100644 --- a/website/docs/r/logging_organization_sink.html.markdown +++ b/website/docs/r/logging_organization_sink.html.markdown @@ -100,6 +100,19 @@ exported: Organization-level logging sinks can be imported using this format: +* `organizations/{{organization_id}}/sinks/{{sink_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import organization-level logging sinks using one of the formats above. For example: + +```tf +import { + id = "organizations/{{organization_id}}/sinks/{{sink_id}}" + to = google_logging_organization_sink.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), organization-level logging sinks can be imported using one of the formats above. For example: + ``` -$ terraform import google_logging_organization_sink.my_sink organizations/{{organization_id}}/sinks/{{sink_id}} +$ terraform import google_logging_organization_sink.default organizations/{{organization_id}}/sinks/{{sink_id}} ``` diff --git a/website/docs/r/logging_project_bucket_config.html.markdown b/website/docs/r/logging_project_bucket_config.html.markdown index fc44ebec44..b9d050eef7 100644 --- a/website/docs/r/logging_project_bucket_config.html.markdown +++ b/website/docs/r/logging_project_bucket_config.html.markdown @@ -151,6 +151,19 @@ exported: This resource can be imported using the following format: +* `projects/{{project}}/locations/{{location}}/buckets/{{bucket_id}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import this resource using one of the formats above. For example: + +```tf +import { + id = "projects/{{project}}/locations/{{location}}/buckets/{{bucket_id}}" + to = google_logging_project_bucket_config.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), this resource can be imported using one of the formats above. For example: + ``` $ terraform import google_logging_project_bucket_config.default projects/{{project}}/locations/{{location}}/buckets/{{bucket_id}} ``` diff --git a/website/docs/r/logging_project_exclusion.html.markdown b/website/docs/r/logging_project_exclusion.html.markdown index ebd08f34b3..7be7b3b313 100644 --- a/website/docs/r/logging_project_exclusion.html.markdown +++ b/website/docs/r/logging_project_exclusion.html.markdown @@ -55,6 +55,19 @@ In addition to the arguments listed above, the following computed attributes are Project-level logging exclusions can be imported using their URI, e.g. +* `projects/{{project_id}}/exclusions/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import project-level logging exclusions using one of the formats above. For example: + +```tf +import { + id = "projects/{{project_id}}/exclusions/{{name}}" + to = google_logging_project_exclusion.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), project-level logging exclusions can be imported using one of the formats above. For example: + ``` -$ terraform import google_logging_project_exclusion.my_exclusion projects/my-project/exclusions/my-exclusion +$ terraform import google_logging_project_exclusion.default projects/{{project_id}}/exclusions/{{name}} ``` diff --git a/website/docs/r/logging_project_sink.html.markdown b/website/docs/r/logging_project_sink.html.markdown index 66253de863..a160077892 100644 --- a/website/docs/r/logging_project_sink.html.markdown +++ b/website/docs/r/logging_project_sink.html.markdown @@ -180,6 +180,19 @@ exported: Project-level logging sinks can be imported using their URI, e.g. +* `projects/{{project_id}}/sinks/{{name}}` + +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import project-level logging sinks using one of the formats above. For example: + +```tf +import { + id = "projects/{{project_id}}/sinks/{{name}}" + to = google_logging_project_sink.default +} +``` + +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), project-level logging sinks can be imported using one of the formats above. For example: + ``` -$ terraform import google_logging_project_sink.my_sink projects/my-project/sinks/my-sink +$ terraform import google_logging_project_sink.default projects/{{project_id}}/sinks/{{name}} ```