add state reader test for cname
parent
6dd4b17e66
commit
c4406b3648
|
@ -445,6 +445,7 @@ func TestTerraformStateReader_Azure_Resources(t *testing.T) {
|
|||
{name: "private dns zone", dirName: "azurerm_private_dns_zone", wantErr: false},
|
||||
{name: "private dns a record", dirName: "azurerm_private_dns_a_record", wantErr: false},
|
||||
{name: "private dns aaaa record", dirName: "azurerm_private_dns_aaaa_record", wantErr: false},
|
||||
{name: "private dns cname record", dirName: "azurerm_private_dns_cname_record", wantErr: false},
|
||||
{name: "images", dirName: "azurerm_image", wantErr: false},
|
||||
{name: "ssh public key", dirName: "azurerm_ssh_public_key", wantErr: false},
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
[
|
||||
{
|
||||
"Id": "/subscriptions/7bfb2c5c-7308-46ed-8ae4-fffa356eb406/resourceGroups/martin-dev/providers/Microsoft.Network/privateDnsZones/thisisatestusingtf.com/CNAME/othertest",
|
||||
"Type": "azurerm_private_dns_cname_record",
|
||||
"Attrs": {
|
||||
"fqdn": "othertest.thisisatestusingtf.com.",
|
||||
"id": "/subscriptions/7bfb2c5c-7308-46ed-8ae4-fffa356eb406/resourceGroups/martin-dev/providers/Microsoft.Network/privateDnsZones/thisisatestusingtf.com/CNAME/othertest",
|
||||
"name": "othertest",
|
||||
"record": "othertest.com",
|
||||
"resource_group_name": "martin-dev",
|
||||
"ttl": 300,
|
||||
"zone_name": "thisisatestusingtf.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": "/subscriptions/7bfb2c5c-7308-46ed-8ae4-fffa356eb406/resourceGroups/martin-dev/providers/Microsoft.Network/privateDnsZones/thisisatestusingtf.com/CNAME/test",
|
||||
"Type": "azurerm_private_dns_cname_record",
|
||||
"Attrs": {
|
||||
"fqdn": "test.thisisatestusingtf.com.",
|
||||
"id": "/subscriptions/7bfb2c5c-7308-46ed-8ae4-fffa356eb406/resourceGroups/martin-dev/providers/Microsoft.Network/privateDnsZones/thisisatestusingtf.com/CNAME/test",
|
||||
"name": "test",
|
||||
"record": "test.com",
|
||||
"resource_group_name": "martin-dev",
|
||||
"ttl": 300,
|
||||
"zone_name": "thisisatestusingtf.com"
|
||||
}
|
||||
}
|
||||
]
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"version": 4,
|
||||
"terraform_version": "0.14.5",
|
||||
"serial": 19,
|
||||
"lineage": "7f22faf7-4655-0f68-3b00-9099a46450a7",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "azurerm_private_dns_cname_record",
|
||||
"name": "othertestcname",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/azurerm\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"fqdn": "othertest.thisisatestusingtf.com.",
|
||||
"id": "/subscriptions/7bfb2c5c-7308-46ed-8ae4-fffa356eb406/resourceGroups/martin-dev/providers/Microsoft.Network/privateDnsZones/thisisatestusingtf.com/CNAME/othertest",
|
||||
"name": "othertest",
|
||||
"record": "othertest.com",
|
||||
"resource_group_name": "martin-dev",
|
||||
"tags": null,
|
||||
"timeouts": null,
|
||||
"ttl": 300,
|
||||
"zone_name": "thisisatestusingtf.com"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInJlYWQiOjMwMDAwMDAwMDAwMCwidXBkYXRlIjoxODAwMDAwMDAwMDAwfX0=",
|
||||
"dependencies": [
|
||||
"azurerm_private_dns_zone.testzone",
|
||||
"data.azurerm_resource_group.martin"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "azurerm_private_dns_cname_record",
|
||||
"name": "testcname",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/azurerm\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"fqdn": "test.thisisatestusingtf.com.",
|
||||
"id": "/subscriptions/7bfb2c5c-7308-46ed-8ae4-fffa356eb406/resourceGroups/martin-dev/providers/Microsoft.Network/privateDnsZones/thisisatestusingtf.com/CNAME/test",
|
||||
"name": "test",
|
||||
"record": "test.com",
|
||||
"resource_group_name": "martin-dev",
|
||||
"tags": null,
|
||||
"timeouts": null,
|
||||
"ttl": 300,
|
||||
"zone_name": "thisisatestusingtf.com"
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInJlYWQiOjMwMDAwMDAwMDAwMCwidXBkYXRlIjoxODAwMDAwMDAwMDAwfX0=",
|
||||
"dependencies": [
|
||||
"azurerm_private_dns_zone.testzone",
|
||||
"data.azurerm_resource_group.martin"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue