mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-25 14:56:18 -05: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,
|
ResourceGroup: conf.Provider.Azure.ResourceGroup,
|
||||||
CustomEndpoint: conf.CustomEndpoint,
|
CustomEndpoint: conf.CustomEndpoint,
|
||||||
InternalLoadBalancer: conf.InternalLoadBalancer,
|
InternalLoadBalancer: conf.InternalLoadBalancer,
|
||||||
|
MarketplaceImage: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
if conf.UseMarketplaceImage() {
|
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.
|
// If a marketplace image is used, only the marketplace reference is required.
|
||||||
vars.MarketplaceImage = terraform.AzureMarketplaceImageVariables{
|
vars.MarketplaceImage = &terraform.AzureMarketplaceImageVariables{
|
||||||
Publisher: azureImage.Publisher,
|
Publisher: azureImage.Publisher,
|
||||||
Product: azureImage.Offer,
|
Product: azureImage.Offer,
|
||||||
Name: azureImage.SKU,
|
Name: azureImage.SKU,
|
||||||
|
@ -210,7 +210,7 @@ type AzureClusterVariables struct {
|
|||||||
// InternalLoadBalancer is true if an internal load balancer should be created.
|
// InternalLoadBalancer is true if an internal load balancer should be created.
|
||||||
InternalLoadBalancer bool `hcl:"internal_load_balancer" cty:"internal_load_balancer"`
|
InternalLoadBalancer bool `hcl:"internal_load_balancer" cty:"internal_load_balancer"`
|
||||||
// MarketplaceImage is the (optional) Azure Marketplace image to use.
|
// 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.
|
// GetCreateMAA gets the CreateMAA variable.
|
||||||
|
@ -193,7 +193,7 @@ func TestAzureClusterVariables(t *testing.T) {
|
|||||||
Debug: to.Ptr(true),
|
Debug: to.Ptr(true),
|
||||||
Location: "eu-central-1",
|
Location: "eu-central-1",
|
||||||
CustomEndpoint: "example.com",
|
CustomEndpoint: "example.com",
|
||||||
MarketplaceImage: AzureMarketplaceImageVariables{
|
MarketplaceImage: &AzureMarketplaceImageVariables{
|
||||||
Publisher: "edgelesssys",
|
Publisher: "edgelesssys",
|
||||||
Product: "constellation",
|
Product: "constellation",
|
||||||
Name: "constellation",
|
Name: "constellation",
|
||||||
|
@ -341,6 +341,7 @@ func Default() *Config {
|
|||||||
ResourceGroup: "",
|
ResourceGroup: "",
|
||||||
DeployCSIDriver: toPtr(true),
|
DeployCSIDriver: toPtr(true),
|
||||||
SecureBoot: toPtr(false),
|
SecureBoot: toPtr(false),
|
||||||
|
UseMarketplaceImage: toPtr(false),
|
||||||
},
|
},
|
||||||
GCP: &GCPConfig{
|
GCP: &GCPConfig{
|
||||||
Project: "",
|
Project: "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user