Skip to content

Commit

Permalink
Fixed the azure subscription accounts by making environment, manageme…
Browse files Browse the repository at this point in the history
…nt_endpoint, and storage_endpoint_suffix optional. (#673)
  • Loading branch information
mcasperson authored Jul 15, 2024
1 parent fc8f369 commit 8b7929d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
9 changes: 3 additions & 6 deletions integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,6 @@ func TestSshAccountResource(t *testing.T) {

// TestAzureSubscriptionAccountResource verifies that an azure account can be reimported with the correct settings
func TestAzureSubscriptionAccountResource(t *testing.T) {
// I could not figure out a combination of properties that made this resource work
return

testFramework := test.OctopusContainerTest{}
testFramework.ArrangeTest(t, func(t *testing.T, container *test.OctopusContainer, spaceClient *client.Client) error {
// Act
Expand Down Expand Up @@ -431,12 +428,12 @@ func TestAzureSubscriptionAccountResource(t *testing.T) {
}
resource := resources.Items[0].(*accounts.AzureSubscriptionAccount)

if resource.AccountType != "AzureServicePrincipal" {
t.Fatal("The account must be have a type of \"AzureServicePrincipal\"")
if resource.AccountType != "AzureSubscription" {
t.Fatal("The account must be have a type of \"AzureSubscription\"")
}

if resource.Description != "A test account" {
t.Fatal("BUG: The account must be have a description of \"A test account\"")
t.Fatal("The account must be have a description of \"A test account\"")
}

if resource.TenantedDeploymentMode != "Untenanted" {
Expand Down
4 changes: 2 additions & 2 deletions octopusdeploy/schema_azure_subscription_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ func getAzureSubscriptionAccountSchema() map[string]*schema.Schema {
"description": getDescriptionSchema("Azure subscription account"),
"environments": getEnvironmentsSchema(),
"management_endpoint": {
Required: true,
Optional: true,
Type: schema.TypeString,
RequiredWith: []string{"azure_environment"},
},
"name": getNameSchema(true),
"space_id": getSpaceIDSchema(),
"storage_endpoint_suffix": {
Description: "The storage endpoint suffix associated with this Azure subscription account.",
Required: true,
Optional: true,
Type: schema.TypeString,
RequiredWith: []string{"azure_environment"},
},
Expand Down
4 changes: 2 additions & 2 deletions terraform/8-azuresubscriptionaccount/azure_account.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ resource "octopusdeploy_azure_subscription_account" "account_subscription" {
tenant_tags = []
tenants = null
tenanted_deployment_participation = "Untenanted"
storage_endpoint_suffix = ""
storage_endpoint_suffix = null
subscription_id = "fde6a0ae-a1d4-40ae-91de-88f4ed898c03"
azure_environment = null
management_endpoint = ""
management_endpoint = null
certificate = "MIIQFgIBAzCCD9wGCSqGSIb3DQEHAaCCD80Egg/JMIIPxTCCBdcGCSqGSIb3DQEHBqCCBcgwggXEAgEAMIIFvQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQID45832+aYFECAggAgIIFkIyL07gJLw9QA/WpRBhh+eDpKQ7/R4ZX7uOKch6UCl+JYs9BE2TkVHSrukZ8YeQY5aHRK6kB5fZSzyD+7+cNIEx1RU8owOdOl0uSIUvDuUu6MXgcCNwkZ+I9DV6eqU991RiO2B2kGAHKsr28z0voOXGP9JDG2kJMF+R1j8LQqRCkJUrEaX0BJ1zeuY05Cv3domuevKSq+Xg1VRGWZEc01Iprb2gTpMpFwusLGase4pyka9XCbDIkqUEjt65cOXzjyiZnKgX376wA6TfB+xrmC9g/839Rt6V2pZA84bDB0AcwHMyUjXN9mdB1mIfFRvOID8Pp019Oc7B+cfipZTubIZld6BPDFRiE8yd3ixkQSPTDv5eHYxtUEt969M6h1viE5xF1YvJ3RaxkZXIOTx5kel5XtOQbMaF8W+pzoY7ljl9bjN+0nPSJgApcTxCvYoILv9Ecy/Ry8CH91BTNTJr+rdLNtcMGFskrS2U+wUhuMtMeEkAPVX2BWYjWvnlDsXiwpzoV/fpzmZCqD8q03Tzt/gM/IaxX3Eb/MZdB60FepgxHu7oom5IQMCzgymUsq4jtKD4fQdBu+QVVggoB1hlrDomCfraThieBqTpQBSTW3TpQ2gPq2pFAIAqexXd7kQVouWDuQWa8vXU35SHKbE3l8yrVT3pK7EdBT4+YQfY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