Skip to content
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

provider/azure: Allow settings_file to accept XML string #2922

Merged
merged 2 commits into from
Aug 3, 2015

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Aug 3, 2015

Update the Azure provider to accept XML data for the settings_file attribute.
Users should now use settings_file = "${file("path to file")}" in their configuration:

provider "azure" {
  settings_file = "${file("credentials.publishsettings")}"
}

Optionally, you can specify the XML inline:

provider "azure" {
  settings_file = <<EOF
<?xml version="1.0" encoding="utf-8"?>
<PublishData>
  <PublishProfile
    SchemaVersion="2.0"
    PublishMethod="AzureServiceManagementAPI">
    <Subscription
      ServiceManagementUrl="https://management.core.windows.net"
      Id="a65bf94f-*********"
      Name="Pay-As-You-Go"
      ManagementCertificate="*********"/>
  </PublishProfile>
</PublishData>
EOF
}

Requires Azure/azure-sdk-for-go#181 (which has been merged into their master branch, but hasn't yet been released as of 2015-08-03)

This is meant to be the Azure complement of #2839

@@ -33,7 +33,7 @@ resource "azure_instance" "web" {

The following arguments are supported:

* `settings_file` - (Optional) The path to a publish settings file used to
* `settings_file` - (Required) Contents of a valid `publishsettings` file, used to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know that this is required? Why was it set as optional in the first place? Maybe there are weird alternative auth mechanisms like instance roles in AWS?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agh, that's actually a mistake I suppose, since you can do the file or the other two things. I was modeling off the Google one, thanks for pointing that out! Fixed in a7543de

@phinze
Copy link
Contributor

phinze commented Aug 3, 2015

One question - code LGTM!

@phinze
Copy link
Contributor

phinze commented Aug 3, 2015

Looks G2G! 🚀

catsby added a commit that referenced this pull request Aug 3, 2015
provider/azure: Allow settings_file to accept XML string
@catsby catsby merged commit 27b1aa6 into master Aug 3, 2015
@catsby catsby deleted the azure-settings-file branch August 3, 2015 21:05
@ghost
Copy link

ghost commented May 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants