Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-source/alicloud_arms_prometheus: Fixed the read error in field push_gate_way_intra_url, push_gate_way_inter_url #8520

Merged
merged 1 commit into from
Mar 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions alicloud/data_source_alicloud_arms_prometheis.go
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func dataSourceAlicloudArmsPrometheis() *schema.Resource {
func dataSourceAliCloudArmsPrometheis() *schema.Resource {
return &schema.Resource{
Read: dataSourceAlicloudArmsPrometheisRead,
Read: dataSourceAliCloudArmsPrometheisRead,
Schema: map[string]*schema.Schema{
"ids": {
Type: schema.TypeList,
@@ -35,12 +35,12 @@ func dataSourceAlicloudArmsPrometheis() *schema.Resource {
Optional: true,
ForceNew: true,
},
"tags": tagsSchemaForceNew(),
"enable_details": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"tags": tagsSchemaForceNew(),
"output_file": {
Type: schema.TypeString,
Optional: true,
@@ -91,6 +91,10 @@ func dataSourceAlicloudArmsPrometheis() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"resource_group_id": {
Type: schema.TypeString,
Computed: true,
},
"remote_read_intra_url": {
Type: schema.TypeString,
Computed: true,
@@ -127,10 +131,6 @@ func dataSourceAlicloudArmsPrometheis() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"resource_group_id": {
Type: schema.TypeString,
Computed: true,
},
"tags": {
Type: schema.TypeMap,
Computed: true,
@@ -142,7 +142,7 @@ func dataSourceAlicloudArmsPrometheis() *schema.Resource {
}
}

func dataSourceAlicloudArmsPrometheisRead(d *schema.ResourceData, meta interface{}) error {
func dataSourceAliCloudArmsPrometheisRead(d *schema.ResourceData, meta interface{}) error {
client := meta.(*connectivity.AliyunClient)

action := "ListPrometheusInstanceByTagAndResourceGroupId"
@@ -195,7 +195,7 @@ func dataSourceAlicloudArmsPrometheisRead(d *schema.ResourceData, meta interface
addDebug(action, response, request)

if err != nil {
return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_arms_prometheis", action, AlibabaCloudSdkGoERROR)
return WrapErrorf(err, DataDefaultErrorMsg, "alicloud_arms_prometheus", action, AlibabaCloudSdkGoERROR)
}

resp, err := jsonpath.Get("$.Data.PrometheusInstances", response)
@@ -244,22 +244,25 @@ func dataSourceAlicloudArmsPrometheisRead(d *schema.ResourceData, meta interface
s = append(s, mapping)
continue
}

id := fmt.Sprint(fmt.Sprint(object["ClusterId"]))
client := meta.(*connectivity.AliyunClient)
armsService := ArmsService{client}
object, err := armsService.DescribeArmsPrometheus(id)

armsPrometheus, err := armsService.DescribeArmsPrometheus(id)
if err != nil {
return WrapError(err)
}
mapping["remote_read_intra_url"] = object["RemoteReadIntraUrl"]
mapping["remote_read_inter_url"] = object["RemoteReadInterUrl"]
mapping["remote_write_intra_url"] = object["RemoteWriteIntraUrl"]
mapping["remote_write_inter_url"] = object["RemoteWriteInterUrl"]
mapping["push_gate_way_intra_url"] = object["PushGateWayIntraUrl"]
mapping["push_gate_way_inter_url"] = object["PushGateWayInterUrl"]
mapping["http_api_intra_url"] = object["HttpApiIntraUrl"]
mapping["http_api_inter_url"] = object["HttpApiInterUrl"]
mapping["auth_token"] = object["AuthToken"]

mapping["remote_read_intra_url"] = armsPrometheus["RemoteReadIntraUrl"]
mapping["remote_read_inter_url"] = armsPrometheus["RemoteReadInterUrl"]
mapping["remote_write_intra_url"] = armsPrometheus["RemoteWriteIntraUrl"]
mapping["remote_write_inter_url"] = armsPrometheus["RemoteWriteInterUrl"]
mapping["push_gate_way_intra_url"] = armsPrometheus["PushGatewayIntraUrl"]
mapping["push_gate_way_inter_url"] = armsPrometheus["PushGatewayInterUrl"]
mapping["http_api_intra_url"] = armsPrometheus["HttpApiIntraUrl"]
mapping["http_api_inter_url"] = armsPrometheus["HttpApiInterUrl"]
mapping["auth_token"] = armsPrometheus["AuthToken"]

s = append(s, mapping)
}

268 changes: 211 additions & 57 deletions alicloud/data_source_alicloud_arms_prometheis_test.go
Original file line number Diff line number Diff line change
@@ -8,64 +8,64 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/helper/acctest"
)

func TestAccAlicloudArmsPrometheisDataSource(t *testing.T) {
func TestAccAliCloudArmsPrometheisDataSource_basic0(t *testing.T) {
rand := acctest.RandIntRange(10, 99)

idsConf := dataSourceTestAccConfig{
existConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
"ids": `["${alicloud_arms_prometheus.default.id}"]`,
"enable_details": `true`,
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"ids": `["${alicloud_arms_prometheus.default.id}"]`,
}),
fakeConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"ids": `["${alicloud_arms_prometheus.default.id}_fake"]`,
}),
}

nameRegexConf := dataSourceTestAccConfig{
existConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"enable_details": `true`,
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
}),
fakeConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}_fake"`,
}),
}

resourceGroupIdConf := dataSourceTestAccConfig{
existConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"resource_group_id": `"${alicloud_arms_prometheus.default.resource_group_id}"`,
"enable_details": `true`,
}),
fakeConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"resource_group_id": `"${alicloud_arms_prometheus.default.resource_group_id}_fake"`,
}),
}

tagsConf := dataSourceTestAccConfig{
existConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"enable_details": `true`,
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"tags": `{
Created = "TF"
For = "Prometheus"
}`,
}),
fakeConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"tags": `{
Created = "TF_Update"
For = "Prometheus_Update"
}`,
}),
}

allConf := dataSourceTestAccConfig{
existConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"ids": `["${alicloud_arms_prometheus.default.id}"]`,
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"enable_details": `true`,
"resource_group_id": `"${alicloud_arms_prometheus.default.resource_group_id}"`,
"tags": `{
Created = "TF"
For = "Prometheus"
}`,
}),
fakeConfig: testAccCheckAlicloudArmsPrometheisDataSourceName(rand, map[string]string{
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"ids": `["${alicloud_arms_prometheus.default.id}_fake"]`,
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}_fake"`,
"resource_group_id": `"${alicloud_arms_prometheus.default.resource_group_id}_fake"`,
@@ -75,54 +75,212 @@ func TestAccAlicloudArmsPrometheisDataSource(t *testing.T) {
}`,
}),
}
var existAlicloudArmsPrometheisDataSourceNameMapFunc = func(rand int) map[string]string {

var existAliCloudArmsPrometheisDataSourceNameMapFunc = func(rand int) map[string]string {
return map[string]string{
"ids.#": "1",
"names.#": "1",
"prometheis.#": "1",
"prometheis.0.id": CHECKSET,
"prometheis.0.cluster_id": CHECKSET,
"prometheis.0.cluster_type": "ecs",
"prometheis.0.cluster_name": CHECKSET,
"prometheis.0.vpc_id": CHECKSET,
"prometheis.0.vswitch_id": CHECKSET,
"prometheis.0.security_group_id": CHECKSET,
"prometheis.0.sub_clusters_json": "",
"prometheis.0.grafana_instance_id": "free",
"prometheis.0.resource_group_id": CHECKSET,
"prometheis.0.tags.%": "2",
"prometheis.0.tags.Created": "TF",
"prometheis.0.tags.For": "Prometheus",
"prometheis.0.remote_read_intra_url": CHECKSET,
"prometheis.0.remote_read_inter_url": CHECKSET,
"prometheis.0.remote_write_intra_url": CHECKSET,
"prometheis.0.remote_write_inter_url": CHECKSET,
//"prometheis.0.push_gate_way_intra_url": CHECKSET,
//"prometheis.0.push_gate_way_inter_url": CHECKSET,
"prometheis.0.http_api_intra_url": CHECKSET,
"prometheis.0.http_api_inter_url": CHECKSET,
//"prometheis.0.auth_token": CHECKSET,
"ids.#": "1",
"names.#": "1",
"prometheis.#": "1",
"prometheis.0.id": CHECKSET,
"prometheis.0.cluster_id": CHECKSET,
"prometheis.0.cluster_type": "ecs",
"prometheis.0.cluster_name": CHECKSET,
"prometheis.0.vpc_id": CHECKSET,
"prometheis.0.vswitch_id": CHECKSET,
"prometheis.0.security_group_id": CHECKSET,
"prometheis.0.sub_clusters_json": "",
"prometheis.0.grafana_instance_id": "free",
"prometheis.0.resource_group_id": CHECKSET,
"prometheis.0.remote_read_intra_url": "",
"prometheis.0.remote_read_inter_url": "",
"prometheis.0.remote_write_intra_url": "",
"prometheis.0.remote_write_inter_url": "",
"prometheis.0.push_gate_way_intra_url": "",
"prometheis.0.push_gate_way_inter_url": "",
"prometheis.0.http_api_intra_url": "",
"prometheis.0.http_api_inter_url": "",
"prometheis.0.auth_token": "",
"prometheis.0.tags.%": "2",
"prometheis.0.tags.Created": "TF",
"prometheis.0.tags.For": "Prometheus",
}
}
var fakeAlicloudArmsPrometheisDataSourceNameMapFunc = func(rand int) map[string]string {

var fakeAliCloudArmsPrometheisDataSourceNameMapFunc = func(rand int) map[string]string {
return map[string]string{
"ids.#": "0",
"names.#": "0",
"prometheis.#": "0",
}
}
var alicloudArmsPrometheisCheckInfo = dataSourceAttr{
resourceId: "data.alicloud_arms_prometheis.default",
existMapFunc: existAlicloudArmsPrometheisDataSourceNameMapFunc,
fakeMapFunc: fakeAlicloudArmsPrometheisDataSourceNameMapFunc,

var aliCloudArmsPrometheisCheckInfo = dataSourceAttr{
resourceId: "data.alicloud_arms_prometheus.default",
existMapFunc: existAliCloudArmsPrometheisDataSourceNameMapFunc,
fakeMapFunc: fakeAliCloudArmsPrometheisDataSourceNameMapFunc,
}

preCheck := func() {
testAccPreCheck(t)
}

aliCloudArmsPrometheisCheckInfo.dataSourceTestCheckWithPreCheck(t, rand, preCheck, idsConf, nameRegexConf, resourceGroupIdConf, tagsConf, allConf)
}

func TestAccAliCloudArmsPrometheisDataSource_basic1(t *testing.T) {
rand := acctest.RandIntRange(10, 99)

idsConf := dataSourceTestAccConfig{
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"ids": `["${alicloud_arms_prometheus.default.id}"]`,
"enable_details": `true`,
}),
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"ids": `["${alicloud_arms_prometheus.default.id}"]`,
"enable_details": `false`,
}),
}

nameRegexConf := dataSourceTestAccConfig{
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"enable_details": `true`,
}),
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"enable_details": `false`,
}),
}

resourceGroupIdConf := dataSourceTestAccConfig{
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"resource_group_id": `"${alicloud_arms_prometheus.default.resource_group_id}"`,
"enable_details": `true`,
}),
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"resource_group_id": `"${alicloud_arms_prometheus.default.resource_group_id}"`,
"enable_details": `false`,
}),
}

tagsConf := dataSourceTestAccConfig{
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"tags": `{
Created = "TF"
For = "Prometheus"
}`,
"enable_details": `true`,
}),
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"tags": `{
Created = "TF"
For = "Prometheus"
}`,
"enable_details": `false`,
}),
}

allConf := dataSourceTestAccConfig{
existConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"ids": `["${alicloud_arms_prometheus.default.id}"]`,
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"resource_group_id": `"${alicloud_arms_prometheus.default.resource_group_id}"`,
"tags": `{
Created = "TF"
For = "Prometheus"
}`,
"enable_details": `true`,
}),
fakeConfig: testAccCheckAliCloudArmsPrometheisDataSourceName(rand, map[string]string{
"ids": `["${alicloud_arms_prometheus.default.id}"]`,
"name_regex": `"${alicloud_arms_prometheus.default.cluster_name}"`,
"resource_group_id": `"${alicloud_arms_prometheus.default.resource_group_id}"`,
"tags": `{
Created = "TF"
For = "Prometheus"
}`,
"enable_details": `false`,
}),
}

var existAliCloudArmsPrometheisDataSourceNameMapFunc = func(rand int) map[string]string {
return map[string]string{
"ids.#": "1",
"names.#": "1",
"prometheis.#": "1",
"prometheis.0.id": CHECKSET,
"prometheis.0.cluster_id": CHECKSET,
"prometheis.0.cluster_type": "ecs",
"prometheis.0.cluster_name": CHECKSET,
"prometheis.0.vpc_id": CHECKSET,
"prometheis.0.vswitch_id": CHECKSET,
"prometheis.0.security_group_id": CHECKSET,
"prometheis.0.sub_clusters_json": "",
"prometheis.0.grafana_instance_id": "free",
"prometheis.0.resource_group_id": CHECKSET,
"prometheis.0.remote_read_intra_url": CHECKSET,
"prometheis.0.remote_read_inter_url": CHECKSET,
"prometheis.0.remote_write_intra_url": CHECKSET,
"prometheis.0.remote_write_inter_url": CHECKSET,
"prometheis.0.push_gate_way_intra_url": CHECKSET,
"prometheis.0.push_gate_way_inter_url": CHECKSET,
"prometheis.0.http_api_intra_url": CHECKSET,
"prometheis.0.http_api_inter_url": CHECKSET,
"prometheis.0.auth_token": "",
"prometheis.0.tags.%": "2",
"prometheis.0.tags.Created": "TF",
"prometheis.0.tags.For": "Prometheus",
}
}

var fakeAliCloudArmsPrometheisDataSourceNameMapFunc = func(rand int) map[string]string {
return map[string]string{
"ids.#": "1",
"names.#": "1",
"prometheis.#": "1",
"prometheis.0.id": CHECKSET,
"prometheis.0.cluster_id": CHECKSET,
"prometheis.0.cluster_type": "ecs",
"prometheis.0.cluster_name": CHECKSET,
"prometheis.0.vpc_id": CHECKSET,
"prometheis.0.vswitch_id": CHECKSET,
"prometheis.0.security_group_id": CHECKSET,
"prometheis.0.sub_clusters_json": "",
"prometheis.0.grafana_instance_id": "free",
"prometheis.0.resource_group_id": CHECKSET,
"prometheis.0.remote_read_intra_url": "",
"prometheis.0.remote_read_inter_url": "",
"prometheis.0.remote_write_intra_url": "",
"prometheis.0.remote_write_inter_url": "",
"prometheis.0.push_gate_way_intra_url": "",
"prometheis.0.push_gate_way_inter_url": "",
"prometheis.0.http_api_intra_url": "",
"prometheis.0.http_api_inter_url": "",
"prometheis.0.auth_token": "",
"prometheis.0.tags.%": "2",
"prometheis.0.tags.Created": "TF",
"prometheis.0.tags.For": "Prometheus",
}
}

var aliCloudArmsPrometheisCheckInfo = dataSourceAttr{
resourceId: "data.alicloud_arms_prometheus.default",
existMapFunc: existAliCloudArmsPrometheisDataSourceNameMapFunc,
fakeMapFunc: fakeAliCloudArmsPrometheisDataSourceNameMapFunc,
}

preCheck := func() {
testAccPreCheck(t)
}
alicloudArmsPrometheisCheckInfo.dataSourceTestCheckWithPreCheck(t, rand, preCheck, idsConf, nameRegexConf, resourceGroupIdConf, tagsConf, allConf)

aliCloudArmsPrometheisCheckInfo.dataSourceTestCheckWithPreCheck(t, rand, preCheck, idsConf, nameRegexConf, resourceGroupIdConf, tagsConf, allConf)
}

func testAccCheckAlicloudArmsPrometheisDataSourceName(rand int, attrMap map[string]string) string {
func testAccCheckAliCloudArmsPrometheisDataSourceName(rand int, attrMap map[string]string) string {
var pairs []string
for k, v := range attrMap {
pairs = append(pairs, k+" = "+v)
@@ -141,9 +299,6 @@ func testAccCheckAlicloudArmsPrometheisDataSourceName(rand int, attrMap map[stri
vpc_id = data.alicloud_vpcs.default.ids.0
}
data "alicloud_resource_manager_resource_groups" "default" {
}
resource "alicloud_security_group" "default" {
vpc_id = data.alicloud_vpcs.default.ids.0
}
@@ -155,14 +310,13 @@ func testAccCheckAlicloudArmsPrometheisDataSourceName(rand int, attrMap map[stri
vswitch_id = data.alicloud_vswitches.default.ids.0
security_group_id = alicloud_security_group.default.id
cluster_name = "${var.name}-${data.alicloud_vpcs.default.ids.0}"
resource_group_id = data.alicloud_resource_manager_resource_groups.default.groups.1.id
tags = {
Created = "TF"
For = "Prometheus"
}
}
data "alicloud_arms_prometheis" "default" {
data "alicloud_arms_prometheus" "default" {
%s
}
`, rand, strings.Join(pairs, " \n "))
4 changes: 2 additions & 2 deletions alicloud/provider.go
Original file line number Diff line number Diff line change
@@ -877,8 +877,8 @@ func Provider() terraform.ResourceProvider {
"alicloud_actiontrail_global_events_storage_region": dataSourceAlicloudActiontrailGlobalEventsStorageRegion(),
"alicloud_dbfs_auto_snap_shot_policies": dataSourceAlicloudDbfsAutoSnapShotPolicies(),
"alicloud_cen_transit_route_table_aggregations": dataSourceAlicloudCenTransitRouteTableAggregations(),
"alicloud_arms_prometheis": dataSourceAlicloudArmsPrometheis(),
"alicloud_arms_prometheus": dataSourceAlicloudArmsPrometheis(),
"alicloud_arms_prometheis": dataSourceAliCloudArmsPrometheis(),
"alicloud_arms_prometheus": dataSourceAliCloudArmsPrometheis(),
"alicloud_ocean_base_instances": dataSourceAlicloudOceanBaseInstances(),
"alicloud_chatbot_agents": dataSourceAlicloudChatbotAgents(),
"alicloud_arms_integration_exporters": dataSourceAlicloudArmsIntegrationExporters(),
28 changes: 12 additions & 16 deletions website/docs/d/arms_prometheus.html.markdown
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ description: |-
Provides a list of Arms Prometheus to the user.
---

# alicloud\_arms\_prometheus
# alicloud_arms_prometheus

This data source provides the Arms Prometheus of the current Alibaba Cloud user.

@@ -30,9 +30,6 @@ data "alicloud_vswitches" "default" {
vpc_id = data.alicloud_vpcs.default.ids.0
}
data "alicloud_resource_manager_resource_groups" "default" {
}
resource "alicloud_security_group" "default" {
vpc_id = data.alicloud_vpcs.default.ids.0
}
@@ -44,7 +41,6 @@ resource "alicloud_arms_prometheus" "default" {
vswitch_id = data.alicloud_vswitches.default.ids.0
security_group_id = alicloud_security_group.default.id
cluster_name = "${var.name}-${data.alicloud_vpcs.default.ids.0}"
resource_group_id = data.alicloud_resource_manager_resource_groups.default.groups.1.id
tags = {
Created = "TF"
For = "Prometheus"
@@ -64,11 +60,11 @@ output "arms_prometheus_id" {

The following arguments are supported:

* `ids` - (Optional, ForceNew, Computed) A list of Prometheus IDs.
* `ids` - (Optional, ForceNew, List) A list of Prometheus IDs.
* `name_regex` - (Optional, ForceNew) A regex string to filter results by Prometheus name.
* `resource_group_id` - (Optional, ForceNew) The ID of the resource group.
* `tags` - (Optional, ForceNew) A mapping of tags to assign to the resource.
* `enable_details` - (Optional) Whether to query details about the instance.
* `enable_details` - (Optional, Bool, Available since v1.214.0) Whether to query the detailed list of resource attributes. Default value: `false`.
* `output_file` - (Optional) File name where to save data source results (after running `terraform plan`).

## Attributes Reference
@@ -87,14 +83,14 @@ The following attributes are exported in addition to the arguments listed above:
* `sub_clusters_json` - The child instance json string of the globalView instance.
* `grafana_instance_id` - The ID of the Grafana workspace.
* `resource_group_id` - The ID of the resource group.
* `remote_read_intra_url` - RemoteRead intranet Url.
* `remote_read_inter_url` - Public Url of remoteRead.
* `remote_write_intra_url` - RemoteWrite Intranet Url.
* `remote_write_inter_url` - RemoteWrite public Url.
* `push_gate_way_intra_url` - PushGateway intranet Url.
* `push_gate_way_inter_url` - PushGateway public network Url.
* `http_api_intra_url` - Http api intranet address.
* `http_api_inter_url` - Http api public network address.
* `auth_token` - The token used to access the data source.
* `remote_read_intra_url` - (Available since v1.214.0) The internal URL for remote read. **Note:** `remote_read_intra_url` takes effect only if `enable_details` is set to `true`.
* `remote_read_inter_url` - (Available since v1.214.0) The public URL for remote read. **Note:** `remote_read_inter_url` takes effect only if `enable_details` is set to `true`.
* `remote_write_intra_url` - (Available since v1.214.0) The internal URL for remote write. **Note:** `remote_write_intra_url` takes effect only if `enable_details` is set to `true`.
* `remote_write_inter_url` - (Available since v1.214.0) The public URL for remote write. **Note:** `remote_write_inter_url` takes effect only if `enable_details` is set to `true`.
* `push_gate_way_intra_url` - (Available since v1.214.0) The internal URL for Pushgateway. **Note:** `push_gate_way_intra_url` takes effect only if `enable_details` is set to `true`.
* `push_gate_way_inter_url` - (Available since v1.214.0) The public URL for Pushgateway. **Note:** `push_gate_way_inter_url` takes effect only if `enable_details` is set to `true`.
* `http_api_intra_url` - (Available since v1.214.0) The internal URL for the HTTP API. **Note:** `http_api_intra_url` takes effect only if `enable_details` is set to `true`.
* `http_api_inter_url` - (Available since v1.214.0) The public URL for the HTTP API. **Note:** `http_api_inter_url` takes effect only if `enable_details` is set to `true`.
* `auth_token` - (Available since v1.214.0) The authorization token. **Note:** `auth_token` takes effect only if `enable_details` is set to `true`.
* `tags` - The tag of the Prometheus.