Skip to content

Commit

Permalink
Merge pull request #1573 from seriva/fix/1570
Browse files Browse the repository at this point in the history
Fixs for changing Terraform templates between Epicli apply runs
  • Loading branch information
seriva authored Aug 20, 2020
2 parents c76022a + 351913d commit 9ff628b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG-0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
- [#846](https://github.com/epiphany-platform/epiphany/issues/846) - Update Filebeat to v7.8.1

### Fixed

- Fix for changing Terraform templates between Epicli apply runs on Azure.
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,6 @@ def get_vm(self, component_key, component_value, vm_config, network_interface_na
vm.specification.network_interface_name = network_interface_name
vm.specification.tags.append({'cluster': cluster_tag(self.cluster_prefix, self.cluster_name)})
vm.specification.tags.append({component_key: ''})
if vm.specification.os_type == 'linux':
# For linux we dont need a PW since we only support SSH. We add something random for Terraform
# to run and later disable password access in Ansible.
vm.specification.admin_password = str(uuid.uuid4())
if vm_config.specification.os_type == 'windows':
raise NotImplementedError('Windows VMs not supported jet.')
pub_key_path = self.cluster_model.specification.admin_user.key_path + '.pub'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ resource "azurerm_virtual_machine" "{{ specification.name }}" {
os_profile {
computer_name = "{{ specification.name }}"
admin_username = "{{ specification.admin_username }}"
{%- if specification.os_type == "windows" %}
admin_password = "{{ specification.admin_password }}"
{%- endif %}
}

{%- if specification.os_type == "linux" %}
Expand Down

0 comments on commit 9ff628b

Please sign in to comment.