mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
terraform: fix Azure marketplace image defaults (#2692)
* config: default to false instead of null for Azure marketplace image Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * terraform: make Azure marketplace image default to null Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> --------- Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
This commit is contained in:
parent
acba9c4c60
commit
6ff321364d
@ -156,6 +156,7 @@ func azureTerraformVars(conf *config.Config, imageRef string) (*terraform.AzureC
|
||||
ResourceGroup: conf.Provider.Azure.ResourceGroup,
|
||||
CustomEndpoint: conf.CustomEndpoint,
|
||||
InternalLoadBalancer: conf.InternalLoadBalancer,
|
||||
MarketplaceImage: nil,
|
||||
}
|
||||
|
||||
if conf.UseMarketplaceImage() {
|
||||
@ -170,7 +171,7 @@ func azureTerraformVars(conf *config.Config, imageRef string) (*terraform.AzureC
|
||||
}
|
||||
|
||||
// If a marketplace image is used, only the marketplace reference is required.
|
||||
vars.MarketplaceImage = terraform.AzureMarketplaceImageVariables{
|
||||
vars.MarketplaceImage = &terraform.AzureMarketplaceImageVariables{
|
||||
Publisher: azureImage.Publisher,
|
||||
Product: azureImage.Offer,
|
||||
Name: azureImage.SKU,
|
||||
|
@ -210,7 +210,7 @@ type AzureClusterVariables struct {
|
||||
// InternalLoadBalancer is true if an internal load balancer should be created.
|
||||
InternalLoadBalancer bool `hcl:"internal_load_balancer" cty:"internal_load_balancer"`
|
||||
// MarketplaceImage is the (optional) Azure Marketplace image to use.
|
||||
MarketplaceImage AzureMarketplaceImageVariables `hcl:"marketplace_image" cty:"marketplace_image"`
|
||||
MarketplaceImage *AzureMarketplaceImageVariables `hcl:"marketplace_image" cty:"marketplace_image"`
|
||||
}
|
||||
|
||||
// GetCreateMAA gets the CreateMAA variable.
|
||||
|
@ -193,7 +193,7 @@ func TestAzureClusterVariables(t *testing.T) {
|
||||
Debug: to.Ptr(true),
|
||||
Location: "eu-central-1",
|
||||
CustomEndpoint: "example.com",
|
||||
MarketplaceImage: AzureMarketplaceImageVariables{
|
||||
MarketplaceImage: &AzureMarketplaceImageVariables{
|
||||
Publisher: "edgelesssys",
|
||||
Product: "constellation",
|
||||
Name: "constellation",
|
||||
|
@ -341,6 +341,7 @@ func Default() *Config {
|
||||
ResourceGroup: "",
|
||||
DeployCSIDriver: toPtr(true),
|
||||
SecureBoot: toPtr(false),
|
||||
UseMarketplaceImage: toPtr(false),
|
||||
},
|
||||
GCP: &GCPConfig{
|
||||
Project: "",
|
||||
|
Loading…
Reference in New Issue
Block a user