-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_kusto_cluster
- support for enable_disk_encryption
and enable_streaming_ingest
#5855
Merged
katbyte
merged 9 commits into
hashicorp:master
from
aqche:azurerm_kusto_cluster_enable_disk_encryption
Mar 2, 2020
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
112329d
add enable_disk_encryption to azurerm_kusto_cluster
aqche 12cde40
more fields support for `azurerm_kusto_cluster`
njuCZ 5ddc01c
add enable_streaming_ingest to azurerm_kusto_cluster
aqche 5397d96
remove duplicate set and undo changes from prettier
aqche eacb58b
Apply suggestions from code review
aqche b248a83
apply changes from code review
aqche 2367b62
merge conflicts
aqche 9d1c8e7
Merge branch 'master' of https://github.com/terraform-providers/terra…
aqche 9e987d5
v0.12 changes
aqche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,45 @@ func TestAccAzureRMKustoCluster_basic(t *testing.T) { | |
}) | ||
} | ||
|
||
func TestAccAzureRMKustoCluster_update(t *testing.T) { | ||
data := acceptance.BuildTestData(t, "azurerm_kusto_cluster", "test") | ||
|
||
resource.ParallelTest(t, resource.TestCase{ | ||
PreCheck: func() { acceptance.PreCheck(t) }, | ||
Providers: acceptance.SupportedProviders, | ||
CheckDestroy: testCheckAzureRMKustoClusterDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccAzureRMKustoCluster_basic(data), | ||
Check: resource.ComposeTestCheckFunc( | ||
testCheckAzureRMKustoClusterExists(data.ResourceName), | ||
resource.TestCheckResourceAttr(data.ResourceName, "enable_disk_encryption", "false"), | ||
resource.TestCheckResourceAttr(data.ResourceName, "enable_streaming_ingest", "false"), | ||
), | ||
}, | ||
data.ImportStep(), | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could wedo an import check here |
||
Config: testAccAzureRMKustoCluster_update(data), | ||
Check: resource.ComposeTestCheckFunc( | ||
testCheckAzureRMKustoClusterExists(data.ResourceName), | ||
resource.TestCheckResourceAttr(data.ResourceName, "enable_disk_encryption", "true"), | ||
resource.TestCheckResourceAttr(data.ResourceName, "enable_streaming_ingest", "true"), | ||
), | ||
}, | ||
data.ImportStep(), | ||
{ | ||
Config: testAccAzureRMKustoCluster_basic(data), | ||
Check: resource.ComposeTestCheckFunc( | ||
testCheckAzureRMKustoClusterExists(data.ResourceName), | ||
resource.TestCheckResourceAttr(data.ResourceName, "enable_disk_encryption", "false"), | ||
resource.TestCheckResourceAttr(data.ResourceName, "enable_streaming_ingest", "false"), | ||
), | ||
}, | ||
data.ImportStep(), | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And then here go back to basic |
||
}) | ||
} | ||
|
||
func TestAccAzureRMKustoCluster_withTags(t *testing.T) { | ||
data := acceptance.BuildTestData(t, "azurerm_kusto_cluster", "test") | ||
|
||
|
@@ -192,6 +231,32 @@ resource "azurerm_kusto_cluster" "test" { | |
`, data.RandomInteger, data.Locations.Primary, data.RandomString) | ||
} | ||
|
||
func testAccAzureRMKustoCluster_update(data acceptance.TestData) string { | ||
return fmt.Sprintf(` | ||
provider "azurerm" { | ||
features {} | ||
} | ||
|
||
resource "azurerm_resource_group" "test" { | ||
name = "acctestRG-%d" | ||
location = "%s" | ||
} | ||
|
||
resource "azurerm_kusto_cluster" "test" { | ||
name = "acctestkc%s" | ||
location = azurerm_resource_group.test.location | ||
resource_group_name = azurerm_resource_group.test.name | ||
enable_disk_encryption = true | ||
enable_streaming_ingest = true | ||
|
||
sku { | ||
name = "Dev(No SLA)_Standard_D11_v2" | ||
capacity = 1 | ||
} | ||
} | ||
`, data.RandomInteger, data.Locations.Primary, data.RandomString) | ||
} | ||
|
||
func testCheckAzureRMKustoClusterDestroy(s *terraform.State) error { | ||
client := acceptance.AzureProvider.Meta().(*clients.Client).Kusto.ClustersClient | ||
ctx := acceptance.AzureProvider.Meta().(*clients.Client).StopContext | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we have a complete test here as described before