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/azurerm: Auto base64encode virtual_machine custom data #12164

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

stack72
Copy link
Contributor

@stack72 stack72 commented Feb 22, 2017

Reported by @sethvargo - we auto encode for AWS, we should follow a
similar pattern for Azure.

In order to escape the double encoding, we check that it's not already
encoded before encoding

@@ -266,7 +266,7 @@ For more information on the different example configurations, please check out t
* `computer_name` - (Required) Specifies the name of the virtual machine.
* `admin_username` - (Required) Specifies the name of the administrator account.
* `admin_password` - (Required) Specifies the password of the administrator account.
* `custom_data` - (Optional) Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.
* `custom_data` - (Optional) Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. Terraform will auto base64encode this string for you.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should update this to be a bit clearer. I recommend:

Specifies custom data to supply to the machine. On linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, Terraform will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes.

@stack72 stack72 force-pushed the b-arm-vm-base64encode-custom_data branch from 724135e to 3edfd66 Compare February 22, 2017 16:09
@stack72 stack72 force-pushed the b-arm-vm-base64encode-custom_data branch from 3edfd66 to 2e9bf33 Compare February 22, 2017 16:15
Reported by @sethvargo - we auto encode for AWS, we should follow a
similar pattern for Azure.

In order to escape the double encoding, we check that it's not already
encoded before encoding
@stack72 stack72 force-pushed the b-arm-vm-base64encode-custom_data branch from 2e9bf33 to 8392cec Compare February 22, 2017 16:21
@stack72 stack72 merged commit dc7f267 into master Feb 22, 2017
@stack72 stack72 deleted the b-arm-vm-base64encode-custom_data branch February 22, 2017 16:26
stack72 added a commit that referenced this pull request Feb 22, 2017
Reported by @sethvargo - we auto encode for AWS, we should follow a
similar pattern for Azure.

In order to escape the double encoding, we check that it's not already
encoded before encoding
@ghost
Copy link

ghost commented Apr 16, 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 Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants