Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sysadm-provisioning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Infrastructure
sysadm-provisioning
Commits
2557dc4c
Commit
2557dc4c
authored
5 years ago
by
Nicolas Dandrimont
Browse files
Options
Downloads
Patches
Plain Diff
Port to terraform 0.12
parent
456f6a27
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
azure/terraform/init.tf
+1
-1
1 addition, 1 deletion
azure/terraform/init.tf
azure/terraform/vault.tf
+19
-18
19 additions, 18 deletions
azure/terraform/vault.tf
azure/terraform/versions.tf
+3
-0
3 additions, 0 deletions
azure/terraform/versions.tf
with
23 additions
and
19 deletions
azure/terraform/init.tf
+
1
−
1
View file @
2557dc4c
...
...
@@ -6,7 +6,7 @@
# Configure the Microsoft Azure Provider
# Empty if using the `az login` tool
provider
"azurerm"
{
version
=
"~> 1.27"
version
=
"~> 1.27"
}
# Reuse the network security group as defined currently
...
...
This diff is collapsed.
Click to expand it.
azure/terraform/vault.tf
+
19
−
18
View file @
2557dc4c
...
...
@@ -5,20 +5,20 @@ resource "azurerm_resource_group" "euwest-vault" {
name
=
"euwest-vault"
location
=
"westeurope"
tags
{
environment
=
"SWH Vault"
tags
=
{
environment
=
"SWH Vault"
}
}
resource
"azurerm_network_interface"
"vangogh-interface"
{
name
=
"vangogh-interface"
location
=
"westeurope"
resource_group_name
=
"euwest-vault"
network_security_group_id
=
"
${
data
.
azurerm_network_security_group
.
worker-nsg
.
id
}
"
name
=
"vangogh-interface"
location
=
"westeurope"
resource_group_name
=
"euwest-vault"
network_security_group_id
=
data
.
azurerm_network_security_group
.
worker-nsg
.
id
ip_configuration
{
name
=
"vaultNicConfiguration"
subnet_id
=
"
${
data
.
azurerm_subnet
.
default
.
id
}
"
subnet_id
=
data
.
azurerm_subnet
.
default
.
id
public_ip_address_id
=
""
private_ip_address_allocation
=
"Dynamic"
}
...
...
@@ -27,22 +27,22 @@ resource "azurerm_network_interface" "vangogh-interface" {
# Blobstorage as defined in task
resource
"azurerm_storage_account"
"vault-storage"
{
name
=
"swhvaultstorage"
resource_group_name
=
"
${
azurerm_resource_group
.
euwest-vault
.
name
}
"
resource_group_name
=
azurerm_resource_group
.
euwest-vault
.
name
location
=
"westeurope"
account_tier
=
"Standard"
account_replication_type
=
"LRS"
account_kind
=
"BlobStorage"
access_tier
=
"Cool"
tags
{
environment
=
"SWH Vault"
tags
=
{
environment
=
"SWH Vault"
}
}
# A container for the blob storage named 'contents' (as other blob storages)
resource
"azurerm_storage_container"
"contents"
{
name
=
"contents"
resource_group_name
=
"
${
azurerm_resource_group
.
euwest-vault
.
name
}
"
storage_account_name
=
"
${
azurerm_storage_account
.
vault-storage
.
name
}
"
resource_group_name
=
azurerm_resource_group
.
euwest-vault
.
name
storage_account_name
=
azurerm_storage_account
.
vault-storage
.
name
container_access_type
=
"private"
}
...
...
@@ -50,7 +50,7 @@ resource "azurerm_virtual_machine" "vault-server" {
name
=
"vangogh"
location
=
"westeurope"
resource_group_name
=
"euwest-vault"
network_interface_ids
=
[
"
${
azurerm_network_interface
.
vangogh-interface
.
id
}
"
]
network_interface_ids
=
[
azurerm_network_interface
.
vangogh-interface
.
id
]
vm_size
=
"Standard_B2ms"
storage_os_disk
{
...
...
@@ -70,18 +70,19 @@ resource "azurerm_virtual_machine" "vault-server" {
# (Va)ngogh <-> (Va)ult
os_profile
{
computer_name
=
"vangogh"
admin_username
=
"
${
var
.
user_admin
}
"
admin_username
=
"
ardumont
"
}
os_profile_linux_config
{
disable_password_authentication
=
true
ssh_keys
{
path
=
"/home/
${
var
.
user_admin
}
/.ssh/authorized_keys"
key_data
=
"
${
var
.
ssh_key_data
}
"
path
=
"/home/
${
var
.
user_admin
}
/.ssh/authorized_keys"
key_data
=
var
.
ssh_key_data
}
}
tags
{
environment
=
"SWH Vault"
tags
=
{
environment
=
"SWH Vault"
}
}
This diff is collapsed.
Click to expand it.
azure/terraform/versions.tf
0 → 100644
+
3
−
0
View file @
2557dc4c
terraform
{
required_version
=
">= 0.12"
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment