feat: add cidr_list attribute to stackit_public_ip_ranges datasource (#1001)
* feat: add cidr_list attribute to stackit_public_ip_ranges datasource Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
This commit is contained in:
parent
800c18fa0b
commit
fcc7a99488
6 changed files with 188 additions and 3 deletions
|
|
@ -38,6 +38,9 @@ var (
|
|||
//go:embed testdata/datasource-image-v2-variants.tf
|
||||
dataSourceImageVariants string
|
||||
|
||||
//go:embed testdata/datasource-public-ip-ranges.tf
|
||||
datasourcePublicIpRanges string
|
||||
|
||||
//go:embed testdata/resource-image-min.tf
|
||||
resourceImageMinConfig string
|
||||
|
||||
|
|
@ -4159,6 +4162,25 @@ func TestAccImageV2DatasourceSearchVariants(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
func TestAccDatasourcePublicIpRanges(t *testing.T) {
|
||||
t.Log("TestDataSource STACKIT Public Ip Ranges")
|
||||
resource.ParallelTest(t, resource.TestCase{
|
||||
ProtoV6ProviderFactories: testutil.TestAccProtoV6ProviderFactories,
|
||||
Steps: []resource.TestStep{
|
||||
// Read
|
||||
{
|
||||
ConfigVariables: config.Variables{},
|
||||
Config: fmt.Sprintf("%s\n%s", datasourcePublicIpRanges, testutil.IaaSProviderConfig()),
|
||||
Check: resource.ComposeAggregateTestCheckFunc(
|
||||
resource.TestCheckResourceAttrSet("data.stackit_public_ip_ranges.example", "id"),
|
||||
resource.TestCheckResourceAttrSet("data.stackit_public_ip_ranges.example", "public_ip_ranges.0.cidr"),
|
||||
resource.TestCheckResourceAttrSet("data.stackit_public_ip_ranges.example", "cidr_list.0"),
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestAccProject(t *testing.T) {
|
||||
projectId := testutil.ProjectId
|
||||
resource.ParallelTest(t, resource.TestCase{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue