diff --git a/docs/guides/consul-root-token.md b/docs/guides/consul-root-token.md index 9edfea06d..d70050759 100644 --- a/docs/guides/consul-root-token.md +++ b/docs/guides/consul-root-token.md @@ -37,6 +37,6 @@ The secret ID of this root token can be used to configure the Consul provider. ``` provider "consul" { address = "example.consul.io:80" - token = hcp_consul_cluster_root_token.example.root_token_secret_id + token = hcp_consul_cluster_root_token.example.secret_id } -``` \ No newline at end of file +``` diff --git a/docs/resources/consul_cluster_root_token.md b/docs/resources/consul_cluster_root_token.md index 92dc2578a..56b9577c0 100644 --- a/docs/resources/consul_cluster_root_token.md +++ b/docs/resources/consul_cluster_root_token.md @@ -3,6 +3,7 @@ page_title: "Resource hcp_consul_cluster_root_token - terraform-provider-hcp" subcategory: "" description: |- The cluster root token resource is the token used to bootstrap the cluster's ACL system. You can also generate this root token from the HCP Consul UI. + Note that creation of this resource will invalidate the default consul_root_token_accessor_id and consul_root_token_secret_id on the target hcp_consul_cluster resource. --- # hcp_consul_cluster_root_token (Resource) @@ -11,6 +12,8 @@ description: |- The cluster root token resource is the token used to bootstrap the cluster's ACL system. You can also generate this root token from the HCP Consul UI. +_Note that creation of this resource will invalidate the default `consul_root_token_accessor_id` and `consul_root_token_secret_id` on the target `hcp_consul_cluster` resource._ + ## Example Usage ```terraform diff --git a/internal/provider/resource_consul_cluster_root_token.go b/internal/provider/resource_consul_cluster_root_token.go index 664169b45..726f94ff4 100644 --- a/internal/provider/resource_consul_cluster_root_token.go +++ b/internal/provider/resource_consul_cluster_root_token.go @@ -34,7 +34,9 @@ data: func resourceConsulClusterRootToken() *schema.Resource { return &schema.Resource{ Description: "The cluster root token resource is the token used to bootstrap the cluster's ACL system. " + - "You can also generate this root token from the HCP Consul UI.", + "You can also generate this root token from the HCP Consul UI.\n\n" + + "_Note that creation of this resource will invalidate the default `consul_root_token_accessor_id` and " + + "`consul_root_token_secret_id` on the target `hcp_consul_cluster` resource._", CreateContext: resourceConsulClusterRootTokenCreate, ReadContext: resourceConsulClusterRootTokenRead, DeleteContext: resourceConsulClusterRootTokenDelete, diff --git a/templates/guides/consul-root-token.md.tmpl b/templates/guides/consul-root-token.md.tmpl index 0b199a705..b6d9bf2f3 100644 --- a/templates/guides/consul-root-token.md.tmpl +++ b/templates/guides/consul-root-token.md.tmpl @@ -18,6 +18,6 @@ The secret ID of this root token can be used to configure the Consul provider. ``` provider "consul" { address = "example.consul.io:80" - token = hcp_consul_cluster_root_token.example.root_token_secret_id + token = hcp_consul_cluster_root_token.example.secret_id } -``` \ No newline at end of file +```