azure-blob 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94edcaaaa7717925c1fb8238b9e7420949b26c98c90344cbf54930d5e0ff3b19
4
- data.tar.gz: aae153da753212659590ed4a3ae029c86cf7ed66b4f924dac1a5f3a5ff3b2e05
3
+ metadata.gz: 9a83c96b748a5659438b382a79a1af068c1552f4ee895dd16b863b00758d8d1f
4
+ data.tar.gz: f6def3a97bde3b96ef53618502454b3c3bd0103e07332ed19f817d3298971860
5
5
  SHA512:
6
- metadata.gz: 102c3d5fd08761199413e96bd8e4bae8a84ac5478d7bb1202e232fbff346703f7cb3b8f344553983b607dbacec56942452ce18aa0afc184a4c994d31dc94118c
7
- data.tar.gz: 646636874dd381757595f82999dd0b7b5647a740512c8e2baf86bdc2045e579cdf78354a4690c746452280efb7ff92cbf9c49c95775ccbcf6a690eb0ae05131f
6
+ metadata.gz: 20f51dbd1ea9661fec78d1371f52459aaf00a4a42e7274f375bd81c7cfc89bac9dfba1546af7cf71f7fea5fd8479fa7ceab9605ea1a8d0ceef7099e0212d4738
7
+ data.tar.gz: 74939a0d48677079ac46585276369a4d090d8bcbdd4e0ab84d37a8a48d2e54977dec5541b823f0a08c7642787ce13041a54311963010a5449424f13a181e72de
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.1] 2024-09-09
4
+
5
+ - Remove dev files from the release
6
+
3
7
  ## [0.5.0] 2024-09-09
4
8
 
5
9
  - Added support for Managed Identities (Entra ID)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AzureBlob
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure-blob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joé Dupuis
@@ -31,20 +31,10 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - ".envrc"
35
- - ".rubocop.yml"
36
- - ".standard.yml"
37
- - ".terraform.lock.hcl"
38
34
  - CHANGELOG.md
39
35
  - LICENSE.txt
40
36
  - README.md
41
37
  - Rakefile
42
- - azure-blob.gemspec
43
- - devenv.local.nix.example
44
- - devenv.lock
45
- - devenv.nix
46
- - devenv.yaml
47
- - input.tf
48
38
  - lib/active_storage/service/azure_blob_service.rb
49
39
  - lib/azure_blob.rb
50
40
  - lib/azure_blob/blob.rb
@@ -62,8 +52,6 @@ files:
62
52
  - lib/azure_blob/shared_key_signer.rb
63
53
  - lib/azure_blob/user_delegation_key.rb
64
54
  - lib/azure_blob/version.rb
65
- - main.tf
66
- - output.tf
67
55
  homepage: https://github.com/testdouble/azure-blob
68
56
  licenses:
69
57
  - MIT
data/.envrc DELETED
@@ -1,3 +0,0 @@
1
- source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0="
2
-
3
- use devenv
data/.rubocop.yml DELETED
@@ -1,25 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 3.1
3
-
4
- # Omakase Ruby styling for Rails
5
- inherit_gem: { rubocop-rails-omakase: rubocop.yml }
6
-
7
- # Overwrite or add rules to create your own house style
8
- #
9
- # # Use `[a, [b, c]]` not `[ a, [ b, c ] ]`
10
- # Layout/SpaceInsideArrayLiteralBrackets:
11
- # Enabled: false
12
-
13
- Style/TrailingCommaInArrayLiteral:
14
- Enabled: true
15
- EnforcedStyleForMultiline: consistent_comma
16
-
17
- Style/TrailingCommaInHashLiteral:
18
- Enabled: true
19
- EnforcedStyleForMultiline: consistent_comma
20
-
21
-
22
- Rails/AssertNot:
23
- Enabled: false
24
- Rails/RefuteMethods:
25
- Enabled: false
data/.standard.yml DELETED
@@ -1,3 +0,0 @@
1
- # For available configuration options, see:
2
- # https://github.com/standardrb/standard
3
- ruby_version: 3.1
data/.terraform.lock.hcl DELETED
@@ -1,22 +0,0 @@
1
- # This file is maintained automatically by "terraform init".
2
- # Manual edits may be lost in future updates.
3
-
4
- provider "registry.terraform.io/hashicorp/azurerm" {
5
- version = "3.113.0"
6
- constraints = "~> 3.0"
7
- hashes = [
8
- "h1:eEUtt0lrLdpVaF6FiDq8BGQPgEcykmhj0aNIL7hTOGw=",
9
- "zh:12479f5664288943400447b55e50df675c28ae82ad8d373cc2e5682f3a3411f0",
10
- "zh:1b42a14e80e568429d3b55fed753ca3ef0df9dcdfa107890d7264599c020940f",
11
- "zh:381be6ca617f848de3baa3985a6e1788e91a803afe04a3c5c727453528b6310d",
12
- "zh:3e70e2e07b6db1c363de3e5d0ca47f27fc956473df03329c7d2e54d3ac29176b",
13
- "zh:87c7633aeaa828098c6055da9e67d4acaf4b46748b6b3f0267e105e55f05de25",
14
- "zh:8d0d98226901f874770dd5220d4701a12ae8bd586994615aa7dcba12b9736bec",
15
- "zh:9fd913acd42a60c3a90a18ce803567ef861db8779a59aacced91f2cbd86de9d9",
16
- "zh:b6f3f7ae0a055437fb36c139af9bb3135e7f4dad172157ae1eb0177dc74d703f",
17
- "zh:b927027ba2bf40d34e03d742fd2b6c5299023b5ab8e6f05e50aac76a46ad1094",
18
- "zh:ceb5187b9d2a439f4e48944f3ffeeeaf47a03dbe6f3325ea1775bf659ce0aa88",
19
- "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c",
20
- "zh:fb9d78dfeca7489bffca9b1a1f3abee7f16dbbcba31388aea1102062c1d6dce8",
21
- ]
22
- }
data/azure-blob.gemspec DELETED
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/azure_blob/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "azure-blob"
7
- spec.version = AzureBlob::VERSION
8
- spec.authors = [ "Joé Dupuis" ]
9
- spec.email = [ "joe@dupuis.io" ]
10
-
11
- spec.summary = "Azure blob client"
12
- spec.homepage = "https://github.com/testdouble/azure-blob"
13
- spec.license = "MIT"
14
- spec.required_ruby_version = ">= 3.1"
15
-
16
- spec.metadata["rubygems_mfa_required"] = "true"
17
- spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = spec.homepage
19
- spec.metadata["changelog_uri"] = "https://github.com/testdouble/azure-blob/blob/main/CHANGELOG.md"
20
-
21
- spec.add_dependency "rexml"
22
-
23
- # Specify which files should be added to the gem when it is released.
24
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
- spec.files = Dir.chdir(__dir__) do
26
- `git ls-files -z`.split("\x0").reject do |f|
27
- (File.expand_path(f) == __FILE__) ||
28
- f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
29
- end
30
- end
31
- spec.bindir = "exe"
32
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
- spec.require_paths = [ "lib" ]
34
- end
@@ -1,8 +0,0 @@
1
- {pkgs, lib, ...}:{
2
- env = {
3
- AZURE_ACCOUNT_NAME = "";
4
- AZURE_ACCESS_KEY = "";
5
- AZURE_PRIVATE_CONTAINER = "";
6
- AZURE_PUBLIC_CONTAINER = "";
7
- };
8
- }
data/devenv.lock DELETED
@@ -1,242 +0,0 @@
1
- {
2
- "nodes": {
3
- "devenv": {
4
- "locked": {
5
- "dir": "src/modules",
6
- "lastModified": 1715593316,
7
- "narHash": "sha256-S7XatU9uV3q9bVBcg/ER0VMQcnPZprrVlN209ne7LDw=",
8
- "owner": "cachix",
9
- "repo": "devenv",
10
- "rev": "725c90407ef53cc2a1b53701c6d2d0745cf2484f",
11
- "type": "github"
12
- },
13
- "original": {
14
- "dir": "src/modules",
15
- "owner": "cachix",
16
- "repo": "devenv",
17
- "type": "github"
18
- }
19
- },
20
- "flake-compat": {
21
- "flake": false,
22
- "locked": {
23
- "lastModified": 1696426674,
24
- "owner": "edolstra",
25
- "repo": "flake-compat",
26
- "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
27
- "treeHash": "2addb7b71a20a25ea74feeaf5c2f6a6b30898ecb",
28
- "type": "github"
29
- },
30
- "original": {
31
- "owner": "edolstra",
32
- "repo": "flake-compat",
33
- "type": "github"
34
- }
35
- },
36
- "flake-compat_2": {
37
- "flake": false,
38
- "locked": {
39
- "lastModified": 1696426674,
40
- "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
41
- "owner": "edolstra",
42
- "repo": "flake-compat",
43
- "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
44
- "type": "github"
45
- },
46
- "original": {
47
- "owner": "edolstra",
48
- "repo": "flake-compat",
49
- "type": "github"
50
- }
51
- },
52
- "flake-utils": {
53
- "inputs": {
54
- "systems": "systems"
55
- },
56
- "locked": {
57
- "lastModified": 1710146030,
58
- "owner": "numtide",
59
- "repo": "flake-utils",
60
- "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
61
- "treeHash": "bd263f021e345cb4a39d80c126ab650bebc3c10c",
62
- "type": "github"
63
- },
64
- "original": {
65
- "owner": "numtide",
66
- "repo": "flake-utils",
67
- "type": "github"
68
- }
69
- },
70
- "flake-utils_2": {
71
- "inputs": {
72
- "systems": "systems_2"
73
- },
74
- "locked": {
75
- "lastModified": 1710146030,
76
- "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
77
- "owner": "numtide",
78
- "repo": "flake-utils",
79
- "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
80
- "type": "github"
81
- },
82
- "original": {
83
- "owner": "numtide",
84
- "repo": "flake-utils",
85
- "type": "github"
86
- }
87
- },
88
- "gitignore": {
89
- "inputs": {
90
- "nixpkgs": [
91
- "pre-commit-hooks",
92
- "nixpkgs"
93
- ]
94
- },
95
- "locked": {
96
- "lastModified": 1709087332,
97
- "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
98
- "owner": "hercules-ci",
99
- "repo": "gitignore.nix",
100
- "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
101
- "type": "github"
102
- },
103
- "original": {
104
- "owner": "hercules-ci",
105
- "repo": "gitignore.nix",
106
- "type": "github"
107
- }
108
- },
109
- "nixpkgs": {
110
- "locked": {
111
- "lastModified": 1725001927,
112
- "owner": "NixOS",
113
- "repo": "nixpkgs",
114
- "rev": "6e99f2a27d600612004fbd2c3282d614bfee6421",
115
- "treeHash": "1e85443cc9f0ba302df2cf61cacb8014943e2d19",
116
- "type": "github"
117
- },
118
- "original": {
119
- "owner": "NixOS",
120
- "ref": "nixos-24.05",
121
- "repo": "nixpkgs",
122
- "type": "github"
123
- }
124
- },
125
- "nixpkgs-ruby": {
126
- "inputs": {
127
- "flake-compat": "flake-compat",
128
- "flake-utils": "flake-utils",
129
- "nixpkgs": "nixpkgs_2"
130
- },
131
- "locked": {
132
- "lastModified": 1724737223,
133
- "owner": "bobvanderlinden",
134
- "repo": "nixpkgs-ruby",
135
- "rev": "175b5867babcbc471b94be9fd5576f2973bbdb6d",
136
- "treeHash": "2fe3404ac0eeb7bcb7ac7b5f5f8b9b6a7e460147",
137
- "type": "github"
138
- },
139
- "original": {
140
- "owner": "bobvanderlinden",
141
- "repo": "nixpkgs-ruby",
142
- "type": "github"
143
- }
144
- },
145
- "nixpkgs-stable": {
146
- "locked": {
147
- "lastModified": 1710695816,
148
- "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
149
- "owner": "NixOS",
150
- "repo": "nixpkgs",
151
- "rev": "614b4613980a522ba49f0d194531beddbb7220d3",
152
- "type": "github"
153
- },
154
- "original": {
155
- "owner": "NixOS",
156
- "ref": "nixos-23.11",
157
- "repo": "nixpkgs",
158
- "type": "github"
159
- }
160
- },
161
- "nixpkgs_2": {
162
- "locked": {
163
- "lastModified": 1725001927,
164
- "owner": "NixOS",
165
- "repo": "nixpkgs",
166
- "rev": "6e99f2a27d600612004fbd2c3282d614bfee6421",
167
- "treeHash": "1e85443cc9f0ba302df2cf61cacb8014943e2d19",
168
- "type": "github"
169
- },
170
- "original": {
171
- "owner": "NixOS",
172
- "ref": "nixos-24.05",
173
- "repo": "nixpkgs",
174
- "type": "github"
175
- }
176
- },
177
- "pre-commit-hooks": {
178
- "inputs": {
179
- "flake-compat": "flake-compat_2",
180
- "flake-utils": "flake-utils_2",
181
- "gitignore": "gitignore",
182
- "nixpkgs": [
183
- "nixpkgs"
184
- ],
185
- "nixpkgs-stable": "nixpkgs-stable"
186
- },
187
- "locked": {
188
- "lastModified": 1715609711,
189
- "narHash": "sha256-/5u29K0c+4jyQ8x7dUIEUWlz2BoTSZWUP2quPwFCE7M=",
190
- "owner": "cachix",
191
- "repo": "pre-commit-hooks.nix",
192
- "rev": "c182c876690380f8d3b9557c4609472ebfa1b141",
193
- "type": "github"
194
- },
195
- "original": {
196
- "owner": "cachix",
197
- "repo": "pre-commit-hooks.nix",
198
- "type": "github"
199
- }
200
- },
201
- "root": {
202
- "inputs": {
203
- "devenv": "devenv",
204
- "nixpkgs": "nixpkgs",
205
- "nixpkgs-ruby": "nixpkgs-ruby",
206
- "pre-commit-hooks": "pre-commit-hooks"
207
- }
208
- },
209
- "systems": {
210
- "locked": {
211
- "lastModified": 1681028828,
212
- "owner": "nix-systems",
213
- "repo": "default",
214
- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
215
- "treeHash": "cce81f2a0f0743b2eb61bc2eb6c7adbe2f2c6beb",
216
- "type": "github"
217
- },
218
- "original": {
219
- "owner": "nix-systems",
220
- "repo": "default",
221
- "type": "github"
222
- }
223
- },
224
- "systems_2": {
225
- "locked": {
226
- "lastModified": 1681028828,
227
- "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
228
- "owner": "nix-systems",
229
- "repo": "default",
230
- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
231
- "type": "github"
232
- },
233
- "original": {
234
- "owner": "nix-systems",
235
- "repo": "default",
236
- "type": "github"
237
- }
238
- }
239
- },
240
- "root": "root",
241
- "version": 7
242
- }
data/devenv.nix DELETED
@@ -1,36 +0,0 @@
1
- { pkgs, config, ... }:
2
-
3
- {
4
- env = {
5
- LD_LIBRARY_PATH = "${config.devenv.profile}/lib";
6
- };
7
-
8
- packages = with pkgs; [
9
- git
10
- libyaml
11
- terraform
12
- azure-cli
13
- glib
14
- vips
15
- sshuttle
16
- sshpass
17
- rsync
18
- ];
19
-
20
- languages.ruby.enable = true;
21
- languages.ruby.version = "3.1.6";
22
-
23
- scripts.generate-env-file.exec = ''
24
- terraform output -raw devenv_local_nix > devenv.local.nix
25
- '';
26
-
27
- scripts.proxy-vps.exec = ''
28
- exec sshuttle -e "ssh -o CheckHostIP=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -r "$(terraform output --raw vm_username)@$(terraform output --raw vm_ip)" 0/0
29
- '';
30
-
31
- scripts.start-app-service-ssh.exec = ''
32
- resource_group=$(terraform output --raw "resource_group")
33
- app_name=$(terraform output --raw "app_service_app_name")
34
- exec az webapp create-remote-connection --resource-group $resource_group --name $app_name
35
- '';
36
- }
data/devenv.yaml DELETED
@@ -1,6 +0,0 @@
1
- allowUnfree: true
2
- inputs:
3
- nixpkgs:
4
- url: github:NixOS/nixpkgs/nixos-24.05
5
- nixpkgs-ruby:
6
- url: github:bobvanderlinden/nixpkgs-ruby
data/input.tf DELETED
@@ -1,44 +0,0 @@
1
- variable "location" {
2
- type = string
3
- default = "westus2"
4
- }
5
-
6
- variable "prefix" {
7
- type = string
8
- default = "azure-blob"
9
- }
10
-
11
- variable "storage_account_name" {
12
- type = string
13
- default = "azureblobrubygemdev"
14
- }
15
-
16
- variable "create_vm" {
17
- type = bool
18
- default = false
19
- }
20
-
21
- variable "vm_size" {
22
- type = string
23
- default = "Standard_B2s"
24
- }
25
-
26
- variable "vm_username" {
27
- type = string
28
- default = "azureblob"
29
- }
30
-
31
- variable "vm_password" {
32
- type = string
33
- default = "qwe123QWE!@#"
34
- }
35
-
36
- variable "create_app_service" {
37
- type = bool
38
- default = false
39
- }
40
-
41
- variable "ssh_key" {
42
- type = string
43
- default = ""
44
- }
data/main.tf DELETED
@@ -1,187 +0,0 @@
1
- terraform {
2
- required_providers {
3
- azurerm = {
4
- source = "hashicorp/azurerm"
5
- version = "~>3.0"
6
- }
7
- }
8
- }
9
-
10
- provider "azurerm" {
11
- features {}
12
- }
13
-
14
- locals {
15
- public_ssh_key = var.ssh_key != "" ? var.ssh_key : file("~/.ssh/id_rsa.pub")
16
- }
17
-
18
- resource "azurerm_resource_group" "main" {
19
- name = var.prefix
20
- location = var.location
21
- tags = {
22
- source = "Terraform"
23
- }
24
- }
25
-
26
- resource "azurerm_storage_account" "main" {
27
- name = var.storage_account_name
28
- resource_group_name = azurerm_resource_group.main.name
29
- location = azurerm_resource_group.main.location
30
- account_tier = "Standard"
31
- account_replication_type = "LRS"
32
-
33
- tags = {
34
- source = "Terraform"
35
- }
36
- }
37
-
38
- resource "azurerm_storage_container" "private" {
39
- name = "private"
40
- storage_account_name = azurerm_storage_account.main.name
41
- container_access_type = "private"
42
- }
43
-
44
- resource "azurerm_storage_container" "public" {
45
- name = "public"
46
- storage_account_name = azurerm_storage_account.main.name
47
- container_access_type = "blob"
48
- }
49
-
50
- resource "azurerm_virtual_network" "main" {
51
- count = var.create_vm ? 1 : 0
52
- name = "${var.prefix}-network"
53
- address_space = ["10.0.0.0/16"]
54
- location = azurerm_resource_group.main.location
55
- resource_group_name = azurerm_resource_group.main.name
56
-
57
- tags = {
58
- source = "Terraform"
59
- }
60
- }
61
-
62
- resource "azurerm_subnet" "main" {
63
- count = var.create_vm ? 1 : 0
64
- name = "${var.prefix}-main"
65
- resource_group_name = azurerm_resource_group.main.name
66
- virtual_network_name = azurerm_virtual_network.main[0].name
67
- address_prefixes = ["10.0.2.0/24"]
68
- }
69
-
70
- resource "azurerm_network_interface" "main" {
71
- count = var.create_vm ? 1 : 0
72
- name = "${var.prefix}-nic"
73
- location = azurerm_resource_group.main.location
74
- resource_group_name = azurerm_resource_group.main.name
75
-
76
- ip_configuration {
77
- name = "${var.prefix}-ip-config"
78
- subnet_id = azurerm_subnet.main[0].id
79
- private_ip_address_allocation = "Dynamic"
80
- public_ip_address_id = azurerm_public_ip.main[0].id
81
- }
82
-
83
- tags = {
84
- source = "Terraform"
85
- }
86
- }
87
-
88
- resource "azurerm_public_ip" "main" {
89
- count = var.create_vm ? 1 : 0
90
- name = "${var.prefix}-public-ip"
91
- resource_group_name = azurerm_resource_group.main.name
92
- location = azurerm_resource_group.main.location
93
- allocation_method = "Static"
94
-
95
- tags = {
96
- source = "Terraform"
97
- }
98
- }
99
-
100
- resource "azurerm_user_assigned_identity" "vm" {
101
- location = azurerm_resource_group.main.location
102
- name = "${var.prefix}-vm"
103
- resource_group_name = azurerm_resource_group.main.name
104
- }
105
-
106
-
107
- resource "azurerm_role_assignment" "vm" {
108
- scope = azurerm_storage_account.main.id
109
- role_definition_name = "Storage Blob Data Contributor"
110
- principal_id = azurerm_user_assigned_identity.vm.principal_id
111
- }
112
-
113
- resource "azurerm_linux_virtual_machine" "main" {
114
- count = var.create_vm ? 1 : 0
115
- name = "${var.prefix}-vm"
116
- computer_name = var.prefix
117
- resource_group_name = azurerm_resource_group.main.name
118
- location = azurerm_resource_group.main.location
119
- size = var.vm_size
120
- admin_username = var.vm_username
121
- admin_password = var.vm_password
122
- disable_password_authentication = true
123
- network_interface_ids = [azurerm_network_interface.main[0].id]
124
-
125
- identity {
126
- type = "UserAssigned"
127
- identity_ids = [azurerm_user_assigned_identity.vm.id]
128
- }
129
-
130
- admin_ssh_key {
131
- username = var.vm_username
132
- public_key = local.public_ssh_key
133
- }
134
-
135
- source_image_reference {
136
- publisher = "Canonical"
137
- offer = "0001-com-ubuntu-server-jammy"
138
- sku = "22_04-lts"
139
- version = "latest"
140
- }
141
-
142
- os_disk {
143
- caching = "ReadWrite"
144
- storage_account_type = "Standard_LRS"
145
- }
146
-
147
- tags = {
148
- source = "Terraform"
149
- }
150
- }
151
-
152
- resource "azurerm_service_plan" "main" {
153
- count = var.create_app_service ? 1 : 0
154
- name = "${var.prefix}-appserviceplan"
155
- resource_group_name = azurerm_resource_group.main.name
156
- location = azurerm_resource_group.main.location
157
- os_type = "Linux"
158
- sku_name = "B1"
159
- }
160
-
161
- resource "azurerm_linux_web_app" "main" {
162
- count = var.create_app_service ? 1 : 0
163
- name = "${var.prefix}-app"
164
- service_plan_id = azurerm_service_plan.main[0].id
165
- resource_group_name = azurerm_resource_group.main.name
166
- location = azurerm_resource_group.main.location
167
-
168
- identity {
169
- type = "UserAssigned"
170
- identity_ids = [azurerm_user_assigned_identity.vm.id]
171
- }
172
-
173
- site_config {
174
- application_stack {
175
- node_version = "20-lts"
176
- }
177
- }
178
- }
179
-
180
- resource "azurerm_app_service_source_control" "main" {
181
- count = var.create_app_service ? 1 : 0
182
- app_id = azurerm_linux_web_app.main[0].id
183
- repo_url = "https://github.com/Azure-Samples/nodejs-docs-hello-world"
184
- branch = "master"
185
- use_manual_integration = true
186
- use_mercurial = false
187
- }
data/output.tf DELETED
@@ -1,30 +0,0 @@
1
- output "devenv_local_nix" {
2
- sensitive = true
3
- value = <<EOT
4
- {pkgs, lib, ...}:{
5
- env = {
6
- AZURE_ACCOUNT_NAME = "${azurerm_storage_account.main.name}";
7
- AZURE_ACCESS_KEY = "${azurerm_storage_account.main.primary_access_key}";
8
- AZURE_PRIVATE_CONTAINER = "${azurerm_storage_container.private.name}";
9
- AZURE_PUBLIC_CONTAINER = "${azurerm_storage_container.public.name}";
10
- AZURE_PRINCIPAL_ID = "${azurerm_user_assigned_identity.vm.principal_id}";
11
- };
12
- }
13
- EOT
14
- }
15
-
16
- output "vm_ip" {
17
- value = var.create_vm ? azurerm_public_ip.main[0].ip_address : ""
18
- }
19
-
20
- output "vm_username" {
21
- value = var.vm_username
22
- }
23
-
24
- output "app_service_app_name" {
25
- value = var.create_app_service ? azurerm_linux_web_app.main[0].name : ""
26
- }
27
-
28
- output "resource_group" {
29
- value = azurerm_resource_group.main.name
30
- }