terraspace_plugin_azurerm 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +12 -0
- data/LICENSE.txt +201 -0
- data/README.md +50 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/templates/hcl/module/main.tf +7 -0
- data/lib/templates/hcl/module/outputs.tf +4 -0
- data/lib/templates/hcl/module/variables.tf +14 -0
- data/lib/templates/hcl/project/config/terraform/backend.tf +10 -0
- data/lib/templates/hcl/project/config/terraform/provider.tf +4 -0
- data/lib/templates/hcl/stack/main.tf +15 -0
- data/lib/templates/hcl/stack/outputs.tf +4 -0
- data/lib/templates/hcl/stack/variables.tf +1 -0
- data/lib/templates/ruby/module/main.rb +7 -0
- data/lib/templates/ruby/module/outputs.rb +4 -0
- data/lib/templates/ruby/module/variables.rb +14 -0
- data/lib/templates/ruby/project/config/terraform/backend.rb +8 -0
- data/lib/templates/ruby/project/config/terraform/provider.rb +4 -0
- data/lib/templates/ruby/stack/main.rb +15 -0
- data/lib/templates/ruby/stack/outputs.rb +4 -0
- data/lib/templates/ruby/stack/variables.rb +1 -0
- data/lib/templates/test/rspec/module/test/.rspec +3 -0
- data/lib/templates/test/rspec/module/test/Gemfile.tt +9 -0
- data/lib/templates/test/rspec/module/test/spec/fixtures/config/terraform/provider.tf +4 -0
- data/lib/templates/test/rspec/module/test/spec/fixtures/stack/main.tf +15 -0
- data/lib/templates/test/rspec/module/test/spec/fixtures/stack/outputs.tf +4 -0
- data/lib/templates/test/rspec/module/test/spec/fixtures/stack/variables.tf +1 -0
- data/lib/templates/test/rspec/module/test/spec/main_spec.rb.tt +27 -0
- data/lib/templates/test/rspec/module/test/spec/spec_helper.rb +13 -0
- data/lib/templates/test/rspec/project/spec/fixtures/config/terraform/provider.tf +4 -0
- data/lib/templates/test/rspec/project/spec/fixtures/tfvars/demo.tfvars +1 -0
- data/lib/templates/test/rspec/project/spec/spec_helper.rb +13 -0
- data/lib/templates/test/rspec/project/spec/stacks/demo/main_spec.rb +27 -0
- data/lib/terraspace_plugin_azurerm.rb +29 -0
- data/lib/terraspace_plugin_azurerm/autoloader.rb +23 -0
- data/lib/terraspace_plugin_azurerm/clients/options.rb +23 -0
- data/lib/terraspace_plugin_azurerm/clients/resources.rb +17 -0
- data/lib/terraspace_plugin_azurerm/clients/storage.rb +26 -0
- data/lib/terraspace_plugin_azurerm/interfaces/backend.rb +14 -0
- data/lib/terraspace_plugin_azurerm/interfaces/backend/base.rb +21 -0
- data/lib/terraspace_plugin_azurerm/interfaces/backend/resource_group_creator.rb +32 -0
- data/lib/terraspace_plugin_azurerm/interfaces/backend/storage_account.rb +55 -0
- data/lib/terraspace_plugin_azurerm/interfaces/backend/storage_container.rb +30 -0
- data/lib/terraspace_plugin_azurerm/interfaces/config.rb +25 -0
- data/lib/terraspace_plugin_azurerm/interfaces/expander.rb +36 -0
- data/lib/terraspace_plugin_azurerm/interfaces/layer.rb +20 -0
- data/lib/terraspace_plugin_azurerm/version.rb +3 -0
- data/terraspace_plugin_azurerm.gemspec +30 -0
- metadata +152 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5558017d6143d6bfda510f1aab5508130506d1a9de81bc75582b145ee2867d3b
|
4
|
+
data.tar.gz: ec7ece5847e2cb02ba991d00ceb7d91e60b4d1886a2c1d7c23333e3fd4369a2d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 33461605e1ff3b16b2eb0d7b4b0230805dc34542181aa51a48a2d6e41a8b1940951673452cc1d9e06a642b47e6b427403edd9265edebffa3a26f190eba081ee3
|
7
|
+
data.tar.gz: '004158f2120660455a6450b581ceda03ce91bacd45b32b836149672fa0b5f800e79b58563c754c65d69d90556a56c900039e4a71caccf3687f138bc5b34f50c1'
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
gem "rake", "~> 12.0"
|
7
|
+
gem "rspec", "~> 3.0"
|
8
|
+
|
9
|
+
group :development, :test do
|
10
|
+
base = ENV['TS_EDGE_ROOT'] || "#{ENV['HOME']}/environment/terraspace-edge"
|
11
|
+
gem "terraspace", path: "#{base}/terraspace"
|
12
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Terraspace Azurerm Plugin
|
2
|
+
|
3
|
+
Azurerm support for [terraspace](https://terraspace.cloud/).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'terraspace_plugin_azurerm'
|
11
|
+
```
|
12
|
+
|
13
|
+
## Configure
|
14
|
+
|
15
|
+
Optionally configure the plugin. Here's an example `azurerm.rb` for your terraspace project.
|
16
|
+
|
17
|
+
config/plugins/azurerm.rb
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
TerraspacePluginAzurerm.configure do |config|
|
21
|
+
config.auto_create = true # set false to disable auto creation
|
22
|
+
|
23
|
+
config.storage_account.sku.name = "Standard_LRS"
|
24
|
+
config.storage_account.sku.tier = "Standard"
|
25
|
+
end
|
26
|
+
```
|
27
|
+
|
28
|
+
By default, this plugin will automatically create the:
|
29
|
+
|
30
|
+
* [resource group](Pluginazurerm)
|
31
|
+
* [storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal)
|
32
|
+
* [storage container](https://docs.microsoft.com/en-us/cli/azure/storage/container?view=azure-cli-latest#az-storage-container-create)
|
33
|
+
|
34
|
+
The settings generally only apply if the resource does not yet exist yet and is created for the first time.
|
35
|
+
|
36
|
+
## Environment Variables
|
37
|
+
|
38
|
+
To create the Azure resources like [resource group](Pluginazurerm), [storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal), and [storage container](https://docs.microsoft.com/en-us/cli/azure/storage/container?view=azure-cli-latest#az-storage-container-create) these environment variables are required:
|
39
|
+
|
40
|
+
AZURE_CLIENT_ID
|
41
|
+
AZURE_CLIENT_SECRET
|
42
|
+
|
43
|
+
There's other env variables can also be set, but are generally inferred.
|
44
|
+
|
45
|
+
AZURE_TENANT_ID
|
46
|
+
AZURE_SUBSCRIPTION_ID
|
47
|
+
|
48
|
+
## Contributing
|
49
|
+
|
50
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/boltops-tools/terraspace_plugin_azurerm.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "terraspace_plugin_azurerm"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
variable "name" {
|
2
|
+
description = "The name of the storage account"
|
3
|
+
type = string
|
4
|
+
}
|
5
|
+
|
6
|
+
variable "resource_group_name" {
|
7
|
+
description = "The name of the resource group"
|
8
|
+
type = string
|
9
|
+
}
|
10
|
+
|
11
|
+
variable "location" {
|
12
|
+
description = "The name of the storage location"
|
13
|
+
type = string
|
14
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# SUBSCRIPTION_HASH is a short 4-char consistent hash of the longer subscription id.
|
2
|
+
# This is useful because azure storage accounts not allowed special characters and can only be 24 chars long.
|
3
|
+
terraform {
|
4
|
+
backend "azurerm" {
|
5
|
+
resource_group_name = "<%= backend_expand('azurerm', 'terraform-resources-:LOCATION') %>"
|
6
|
+
storage_account_name = "<%= backend_expand('azurerm', 'ts:SUBSCRIPTION_HASH:LOCATION:ENV') %>"
|
7
|
+
container_name = "terraform-state"
|
8
|
+
key = "<%= backend_expand('azurerm', ':LOCATION/:ENV/:BUILD_DIR') %>"
|
9
|
+
}
|
10
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
resource "random_pet" "this" {
|
2
|
+
length = 1 # using 1, since default separator is '-', also account name can only be 24 characters, and lowercase letters
|
3
|
+
}
|
4
|
+
|
5
|
+
resource "azurerm_resource_group" "this" {
|
6
|
+
name = "demo-resources-${random_pet.this.id}"
|
7
|
+
location = "eastus"
|
8
|
+
}
|
9
|
+
|
10
|
+
module "storage_account" {
|
11
|
+
source = "../../modules/example"
|
12
|
+
name = "sa${random_pet.this.id}"
|
13
|
+
resource_group_name = azurerm_resource_group.this.name
|
14
|
+
location = azurerm_resource_group.this.location
|
15
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
# This is where you put an example
|
@@ -0,0 +1,14 @@
|
|
1
|
+
variable("name",
|
2
|
+
description: "The name of the storage account",
|
3
|
+
type: "string",
|
4
|
+
)
|
5
|
+
|
6
|
+
variable("resource_group_name",
|
7
|
+
description: "The name of the resource group",
|
8
|
+
type: "string",
|
9
|
+
)
|
10
|
+
|
11
|
+
variable("location",
|
12
|
+
description: "The name of the storage location",
|
13
|
+
type: "string",
|
14
|
+
)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# SUBSCRIPTION_HASH is a short 4-char consistent hash of the longer subscription id.
|
2
|
+
# This is useful because azure storage accounts not allowed special characters and can only be 24 chars long.
|
3
|
+
backend("azurerm",
|
4
|
+
resource_group_name: "terraform-resources-:LOCATION",
|
5
|
+
storage_account_name: "ts:SUBSCRIPTION_HASH:LOCATION:ENV",
|
6
|
+
container_name: "terraform-state",
|
7
|
+
key: ":LOCATION/:ENV/:BUILD_DIR",
|
8
|
+
)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
resource("random_pet", "this",
|
2
|
+
length: 1, # using 1, since default separator is '-', also account name can only be 24 characters, and lowercase letters
|
3
|
+
)
|
4
|
+
|
5
|
+
resource("azurerm_resource_group", "this",
|
6
|
+
name: "demo-resources-${random_pet.this.id}",
|
7
|
+
location: "eastus",
|
8
|
+
)
|
9
|
+
|
10
|
+
module!("storage_account",
|
11
|
+
source: "../../modules/example",
|
12
|
+
name: "sa${random_pet.this.id}",
|
13
|
+
resource_group_name: "${azurerm_resource_group.this.name}",
|
14
|
+
location: "${azurerm_resource_group.this.location}",
|
15
|
+
)
|
@@ -0,0 +1 @@
|
|
1
|
+
# This is where you put an example
|
@@ -0,0 +1,15 @@
|
|
1
|
+
resource "random_pet" "this" {
|
2
|
+
length = 1 # using 1, since default separator is '-', also account name can only be 24 characters, and lowercase letters
|
3
|
+
}
|
4
|
+
|
5
|
+
resource "azurerm_resource_group" "this" {
|
6
|
+
name = "demo-resources-${random_pet.this.id}"
|
7
|
+
location = "eastus"
|
8
|
+
}
|
9
|
+
|
10
|
+
module "storage_account" {
|
11
|
+
source = "../../modules/example"
|
12
|
+
name = "sa${random_pet.this.id}"
|
13
|
+
resource_group_name = azurerm_resource_group.this.name
|
14
|
+
location = azurerm_resource_group.this.location
|
15
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
# This is where you put an example
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# This starter example of a spec that creates a test harness and provisions a real s3 bucket.
|
2
|
+
# The test harness will be created at:
|
3
|
+
#
|
4
|
+
# /tmp/terraspace-test-harnesses/<%= @name %>
|
5
|
+
#
|
6
|
+
# It's recommended to run this on a test AWS account.
|
7
|
+
#
|
8
|
+
describe "main" do
|
9
|
+
before(:all) do
|
10
|
+
mod_path = File.expand_path("../..", __dir__)
|
11
|
+
terraspace.build_test_harness(
|
12
|
+
name: "<%= @name %>",
|
13
|
+
modules: {example: mod_path},
|
14
|
+
stacks: {example: "#{mod_path}/test/spec/fixtures/stack"},
|
15
|
+
config: "#{mod_path}/test/spec/fixtures/config",
|
16
|
+
)
|
17
|
+
terraspace.up("example")
|
18
|
+
end
|
19
|
+
after(:all) do
|
20
|
+
terraspace.down("example")
|
21
|
+
end
|
22
|
+
|
23
|
+
it "successful deploy" do
|
24
|
+
storage_account_id = terraspace.output("example", "storage_account_id")
|
25
|
+
expect(storage_account_id).to include("sa") # starts with sa
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
# var = "value"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
describe "main" do
|
2
|
+
before(:all) do
|
3
|
+
# Build terraspace project to use as a test harness
|
4
|
+
# Will be located at: /tmp/terraspace/test-harnesses/demo-harness
|
5
|
+
terraspace.build_test_harness(
|
6
|
+
name: "demo-harness",
|
7
|
+
modules: "app/modules", # include all modules in this folder
|
8
|
+
stacks: "app/stacks", # include all stacks in this folder
|
9
|
+
# override demo stack tfvars for testing
|
10
|
+
# copied over to test harness' app/stacks/demo/tfvars/test.tfvars
|
11
|
+
tfvars: {demo: "spec/fixtures/tfvars/demo.tfvars"},
|
12
|
+
config: "spec/fixtures/config",
|
13
|
+
)
|
14
|
+
terraspace.up("demo") # provision real resources
|
15
|
+
end
|
16
|
+
after(:all) do
|
17
|
+
terraspace.down("demo") # destroy real resources
|
18
|
+
end
|
19
|
+
|
20
|
+
it "successful deploy" do
|
21
|
+
# Replace with your actual test
|
22
|
+
expect(true).to be true
|
23
|
+
# Example
|
24
|
+
storage_account_id = terraspace.output("demo", "storage_account_id")
|
25
|
+
expect(storage_account_id).to include("sa") # starts with sa
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "azure_info"
|
2
|
+
require "memoist"
|
3
|
+
require "terraspace" # for interface
|
4
|
+
|
5
|
+
require "terraspace_plugin_azurerm/version"
|
6
|
+
require "terraspace_plugin_azurerm/autoloader"
|
7
|
+
TerraspacePluginAzurerm::Autoloader.setup
|
8
|
+
|
9
|
+
module TerraspacePluginAzurerm
|
10
|
+
class Error < StandardError; end
|
11
|
+
|
12
|
+
# Friendlier method for config/plugins/azurerm.rb. Example:
|
13
|
+
#
|
14
|
+
# TerraspacePluginAzurerm.configure do |config|
|
15
|
+
# config.resource.property = "value"
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
def configure(&block)
|
19
|
+
Interfaces::Config.instance.configure(&block)
|
20
|
+
end
|
21
|
+
extend self
|
22
|
+
end
|
23
|
+
|
24
|
+
Terraspace::Plugin.register("azurerm",
|
25
|
+
backend: "azurerm",
|
26
|
+
config_class: TerraspacePluginAzurerm::Interfaces::Config,
|
27
|
+
layer_class: TerraspacePluginAzurerm::Interfaces::Layer,
|
28
|
+
root: File.dirname(__dir__),
|
29
|
+
)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "zeitwerk"
|
2
|
+
|
3
|
+
module TerraspacePluginAzurerm
|
4
|
+
class Autoloader
|
5
|
+
class Inflector < Zeitwerk::Inflector
|
6
|
+
def camelize(basename, _abspath)
|
7
|
+
map = { cli: "CLI", version: "VERSION" }
|
8
|
+
map[basename.to_sym] || super
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class << self
|
13
|
+
def setup
|
14
|
+
loader = Zeitwerk::Loader.new
|
15
|
+
loader.inflector = Inflector.new
|
16
|
+
lib = File.expand_path("../", __dir__)
|
17
|
+
loader.push_dir(lib)
|
18
|
+
# loader.ignore("#{lib}/special-cases.rb")
|
19
|
+
loader.setup
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module TerraspacePluginAzurerm::Clients
|
2
|
+
module Options
|
3
|
+
extend Memoist
|
4
|
+
|
5
|
+
def client_options
|
6
|
+
client_id = ENV['AZURE_CLIENT_ID']
|
7
|
+
client_secret = ENV['AZURE_CLIENT_SECRET']
|
8
|
+
subscription_id = ENV['AZURE_SUBSCRIPTION_ID'] || AzureInfo.subscription_id
|
9
|
+
tenant_id = ENV['AZURE_TENANT_ID'] || AzureInfo.tenant_id
|
10
|
+
|
11
|
+
provider = MsRestAzure::ApplicationTokenProvider.new(tenant_id, client_id, client_secret)
|
12
|
+
credentials = MsRest::TokenCredentials.new(provider)
|
13
|
+
|
14
|
+
{
|
15
|
+
tenant_id: tenant_id,
|
16
|
+
client_id: client_id,
|
17
|
+
client_secret: client_secret,
|
18
|
+
subscription_id: subscription_id,
|
19
|
+
credentials: credentials
|
20
|
+
}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'azure_mgmt_resources'
|
2
|
+
|
3
|
+
module TerraspacePluginAzurerm::Clients
|
4
|
+
module Resources
|
5
|
+
include Options
|
6
|
+
extend Memoist
|
7
|
+
|
8
|
+
# Include SDK modules to ease access to Resources classes.
|
9
|
+
include Azure::Resources::Profiles::Latest::Mgmt
|
10
|
+
include Azure::Resources::Profiles::Latest::Mgmt::Models
|
11
|
+
|
12
|
+
def mgmt
|
13
|
+
Client.new(client_options)
|
14
|
+
end
|
15
|
+
memoize :mgmt
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "azure_mgmt_storage"
|
2
|
+
|
3
|
+
module TerraspacePluginAzurerm::Clients
|
4
|
+
module Storage
|
5
|
+
include Options
|
6
|
+
extend Memoist
|
7
|
+
|
8
|
+
# Include SDK modules to ease access to Storage classes.
|
9
|
+
include Azure::Storage::Profiles::Latest::Mgmt
|
10
|
+
include Azure::Storage::Profiles::Latest::Mgmt::Models
|
11
|
+
|
12
|
+
def storage_accounts
|
13
|
+
mgmt.storage_accounts
|
14
|
+
end
|
15
|
+
|
16
|
+
def blob_containers
|
17
|
+
BlobContainers.new(mgmt)
|
18
|
+
end
|
19
|
+
memoize :blob_containers
|
20
|
+
|
21
|
+
def mgmt
|
22
|
+
Client.new(client_options)
|
23
|
+
end
|
24
|
+
memoize :mgmt
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module TerraspacePluginAzurerm::Interfaces
|
2
|
+
class Backend
|
3
|
+
include Terraspace::Plugin::Backend::Interface
|
4
|
+
|
5
|
+
# interface method
|
6
|
+
def call
|
7
|
+
return unless Config.instance.config.auto_create
|
8
|
+
|
9
|
+
ResourceGroupCreator.new(@info).create
|
10
|
+
StorageAccount.new(@info).create
|
11
|
+
StorageContainer.new(@info).create
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class TerraspacePluginAzurerm::Interfaces::Backend
|
2
|
+
class Base
|
3
|
+
extend Memoist
|
4
|
+
|
5
|
+
def initialize(info)
|
6
|
+
@info = info
|
7
|
+
@resource_group_name = @info["resource_group_name"]
|
8
|
+
@storage_account_name = @info["storage_account_name"]
|
9
|
+
@container_name = @info["container_name"]
|
10
|
+
end
|
11
|
+
|
12
|
+
def config
|
13
|
+
TerraspacePluginAzurerm::Interfaces::Config.instance.config
|
14
|
+
end
|
15
|
+
|
16
|
+
def azure_info
|
17
|
+
AzureInfo
|
18
|
+
end
|
19
|
+
memoize :azure_info
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class TerraspacePluginAzurerm::Interfaces::Backend
|
2
|
+
# Named ResourceGroupCreator to avoid collision with Azure ResourceGroup model
|
3
|
+
class ResourceGroupCreator < Base
|
4
|
+
include TerraspacePluginAzurerm::Clients::Resources
|
5
|
+
|
6
|
+
def create
|
7
|
+
if exist?
|
8
|
+
puts "Resource Group #{@resource_group_name} already exists" if ENV['TS_LOUD']
|
9
|
+
else
|
10
|
+
create_resource_group
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def exist?
|
15
|
+
resource_groups.check_existence(@resource_group_name)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_resource_group
|
19
|
+
puts "Creating Resource Group #{@resource_group_name}..."
|
20
|
+
resource_group = ResourceGroup.new
|
21
|
+
resource_group.name = @resource_group_name
|
22
|
+
resource_group.location = config.location || AzureInfo.location
|
23
|
+
resource_groups.create_or_update(@resource_group_name, resource_group)
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
def resource_groups
|
28
|
+
ResourceGroups.new(mgmt)
|
29
|
+
end
|
30
|
+
memoize :resource_groups
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
class TerraspacePluginAzurerm::Interfaces::Backend
|
2
|
+
class StorageAccount < Base
|
3
|
+
include TerraspacePluginAzurerm::Clients::Storage
|
4
|
+
extend Memoist
|
5
|
+
|
6
|
+
def create
|
7
|
+
if exist?
|
8
|
+
puts "Storage Account #{@storage_account_name} already exists" if ENV['TS_LOUD']
|
9
|
+
else
|
10
|
+
create_storage_account
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def exist?
|
15
|
+
params = StorageAccountCheckNameAvailabilityParameters.new
|
16
|
+
params.name = @storage_account_name
|
17
|
+
result = storage_accounts.check_name_availability(params)
|
18
|
+
validate!(result)
|
19
|
+
!result.name_available
|
20
|
+
end
|
21
|
+
|
22
|
+
def validate!(result)
|
23
|
+
return true if result.name_available
|
24
|
+
|
25
|
+
case result.reason
|
26
|
+
when "AccountNameInvalid"
|
27
|
+
puts "ERROR: Failed to create storage account, reason: #{result.reason}".color(:red)
|
28
|
+
puts "Provided storage_account_name: #{@storage_account_name}"
|
29
|
+
exit 1
|
30
|
+
else
|
31
|
+
false
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def create_storage_account
|
36
|
+
puts "Creating Storage Account #{@storage_account_name}..."
|
37
|
+
storage_accounts.create(@resource_group_name, @storage_account_name, storage_account_params)
|
38
|
+
end
|
39
|
+
|
40
|
+
def storage_account_params
|
41
|
+
params = StorageAccountCreateParameters.new
|
42
|
+
params.location = config.location || azure_info.location # IE: eastus
|
43
|
+
params.sku = sku
|
44
|
+
params.kind = Kind::StorageV2
|
45
|
+
params
|
46
|
+
end
|
47
|
+
|
48
|
+
def sku
|
49
|
+
sku = Sku.new
|
50
|
+
sku.name = config.storage_account.sku.name
|
51
|
+
sku.tier = config.storage_account.sku.tier
|
52
|
+
sku
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
class TerraspacePluginAzurerm::Interfaces::Backend
|
2
|
+
class StorageContainer < Base
|
3
|
+
include TerraspacePluginAzurerm::Clients::Storage
|
4
|
+
extend Memoist
|
5
|
+
|
6
|
+
def create
|
7
|
+
if exist?
|
8
|
+
puts "Storage Container #{@container_name} already exists" if ENV['TS_LOUD']
|
9
|
+
else
|
10
|
+
create_storage_container
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def exist?
|
15
|
+
begin
|
16
|
+
blob_containers.get(@resource_group_name, @storage_account_name, @container_name)
|
17
|
+
true
|
18
|
+
rescue MsRestAzure::AzureOperationError => e
|
19
|
+
e.message.include?("The specified container does not exist") ? false : raise
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def create_storage_container
|
24
|
+
puts "Creating Storage Container #{@container_name}..."
|
25
|
+
blob_container = BlobContainer.new
|
26
|
+
blob_container.name = @container_name
|
27
|
+
blob_containers.create(@resource_group_name, @storage_account_name, @container_name, blob_container)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module TerraspacePluginAzurerm::Interfaces
|
2
|
+
class Config
|
3
|
+
include Terraspace::Plugin::Config::Interface
|
4
|
+
include Singleton # Config class must be a Singleton with the class .instance method
|
5
|
+
|
6
|
+
def provider
|
7
|
+
"azurerm"
|
8
|
+
end
|
9
|
+
|
10
|
+
# interface method
|
11
|
+
# must return an ActiveSupport::OrderedOptions
|
12
|
+
def defaults
|
13
|
+
c = ActiveSupport::OrderedOptions.new
|
14
|
+
c.auto_create = true
|
15
|
+
c.location = nil # AzureInfo.location not assigned here so it can be lazily inferred
|
16
|
+
|
17
|
+
c.storage_account = ActiveSupport::OrderedOptions.new
|
18
|
+
c.storage_account.sku = ActiveSupport::OrderedOptions.new
|
19
|
+
c.storage_account.sku.name = "Standard_LRS"
|
20
|
+
c.storage_account.sku.tier = "Standard"
|
21
|
+
|
22
|
+
c
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'digest/sha1'
|
2
|
+
|
3
|
+
# This is where you define variable substitions for the Terraspace expander.
|
4
|
+
# Methods are available as variables. For example:
|
5
|
+
#
|
6
|
+
# variable | method
|
7
|
+
# ------------------|--------
|
8
|
+
# :LOCATION | location
|
9
|
+
# :SUSCRIPTION | suscription
|
10
|
+
# :SUSCRIPTION_HASH | suscription_hash
|
11
|
+
# :NAMESPACE_HASH | namespace_hash
|
12
|
+
#
|
13
|
+
module TerraspacePluginAzurerm::Interfaces
|
14
|
+
class Expander
|
15
|
+
include Terraspace::Plugin::Expander::Interface
|
16
|
+
|
17
|
+
delegate :subscription_id, :subscription, :tenant_id, :tenant_id, :group, :location, to: :azure_info
|
18
|
+
alias_method :namespace, :subscription
|
19
|
+
|
20
|
+
def azure_info
|
21
|
+
AzureInfo
|
22
|
+
end
|
23
|
+
|
24
|
+
# subscription_hash is a short 4-char consistent hash of the longer subscription id.
|
25
|
+
# This is useful because azure storage accounts not allowed special characters and can only be 24 chars long.
|
26
|
+
# NOTE: be careful to not change this! or else state path will change
|
27
|
+
def subscription_hash
|
28
|
+
Digest::SHA1.hexdigest(subscription)[0..3]
|
29
|
+
end
|
30
|
+
|
31
|
+
# NOTE: be careful to not change this! or else state path will change
|
32
|
+
def namespace_hash
|
33
|
+
Digest::SHA1.hexdigest(subscription)[0..3]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module TerraspacePluginAzurerm::Interfaces
|
2
|
+
class Layer
|
3
|
+
extend Memoist
|
4
|
+
|
5
|
+
# interface method
|
6
|
+
def namespace
|
7
|
+
AzureInfo.subscription_id
|
8
|
+
end
|
9
|
+
|
10
|
+
# interface method
|
11
|
+
def region
|
12
|
+
AzureInfo.location
|
13
|
+
end
|
14
|
+
|
15
|
+
# interface method
|
16
|
+
def provider
|
17
|
+
"azurerm"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require_relative 'lib/terraspace_plugin_azurerm/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "terraspace_plugin_azurerm"
|
5
|
+
spec.version = TerraspacePluginAzurerm::VERSION
|
6
|
+
spec.authors = ["Tung Nguyen"]
|
7
|
+
spec.email = ["tung@boltops.com"]
|
8
|
+
|
9
|
+
spec.summary = "Terraspace Azurerm Cloud Plugin"
|
10
|
+
spec.homepage = "https://github.com/boltops-tools/terraspace_plugin_azurerm"
|
11
|
+
spec.license = "Apache2.0"
|
12
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
13
|
+
|
14
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
# spec.add_dependency "azure_info"
|
26
|
+
spec.add_dependency "azure_mgmt_resources"
|
27
|
+
spec.add_dependency "azure_mgmt_storage"
|
28
|
+
spec.add_dependency "memoist"
|
29
|
+
spec.add_dependency "zeitwerk"
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: terraspace_plugin_azurerm
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tung Nguyen
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-06-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: azure_mgmt_resources
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: azure_mgmt_storage
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: memoist
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: zeitwerk
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- tung@boltops.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".rspec"
|
78
|
+
- CHANGELOG.md
|
79
|
+
- Gemfile
|
80
|
+
- LICENSE.txt
|
81
|
+
- README.md
|
82
|
+
- Rakefile
|
83
|
+
- bin/console
|
84
|
+
- bin/setup
|
85
|
+
- lib/templates/hcl/module/main.tf
|
86
|
+
- lib/templates/hcl/module/outputs.tf
|
87
|
+
- lib/templates/hcl/module/variables.tf
|
88
|
+
- lib/templates/hcl/project/config/terraform/backend.tf
|
89
|
+
- lib/templates/hcl/project/config/terraform/provider.tf
|
90
|
+
- lib/templates/hcl/stack/main.tf
|
91
|
+
- lib/templates/hcl/stack/outputs.tf
|
92
|
+
- lib/templates/hcl/stack/variables.tf
|
93
|
+
- lib/templates/ruby/module/main.rb
|
94
|
+
- lib/templates/ruby/module/outputs.rb
|
95
|
+
- lib/templates/ruby/module/variables.rb
|
96
|
+
- lib/templates/ruby/project/config/terraform/backend.rb
|
97
|
+
- lib/templates/ruby/project/config/terraform/provider.rb
|
98
|
+
- lib/templates/ruby/stack/main.rb
|
99
|
+
- lib/templates/ruby/stack/outputs.rb
|
100
|
+
- lib/templates/ruby/stack/variables.rb
|
101
|
+
- lib/templates/test/rspec/module/test/.rspec
|
102
|
+
- lib/templates/test/rspec/module/test/Gemfile.tt
|
103
|
+
- lib/templates/test/rspec/module/test/spec/fixtures/config/terraform/provider.tf
|
104
|
+
- lib/templates/test/rspec/module/test/spec/fixtures/stack/main.tf
|
105
|
+
- lib/templates/test/rspec/module/test/spec/fixtures/stack/outputs.tf
|
106
|
+
- lib/templates/test/rspec/module/test/spec/fixtures/stack/variables.tf
|
107
|
+
- lib/templates/test/rspec/module/test/spec/main_spec.rb.tt
|
108
|
+
- lib/templates/test/rspec/module/test/spec/spec_helper.rb
|
109
|
+
- lib/templates/test/rspec/project/spec/fixtures/config/terraform/provider.tf
|
110
|
+
- lib/templates/test/rspec/project/spec/fixtures/tfvars/demo.tfvars
|
111
|
+
- lib/templates/test/rspec/project/spec/spec_helper.rb
|
112
|
+
- lib/templates/test/rspec/project/spec/stacks/demo/main_spec.rb
|
113
|
+
- lib/terraspace_plugin_azurerm.rb
|
114
|
+
- lib/terraspace_plugin_azurerm/autoloader.rb
|
115
|
+
- lib/terraspace_plugin_azurerm/clients/options.rb
|
116
|
+
- lib/terraspace_plugin_azurerm/clients/resources.rb
|
117
|
+
- lib/terraspace_plugin_azurerm/clients/storage.rb
|
118
|
+
- lib/terraspace_plugin_azurerm/interfaces/backend.rb
|
119
|
+
- lib/terraspace_plugin_azurerm/interfaces/backend/base.rb
|
120
|
+
- lib/terraspace_plugin_azurerm/interfaces/backend/resource_group_creator.rb
|
121
|
+
- lib/terraspace_plugin_azurerm/interfaces/backend/storage_account.rb
|
122
|
+
- lib/terraspace_plugin_azurerm/interfaces/backend/storage_container.rb
|
123
|
+
- lib/terraspace_plugin_azurerm/interfaces/config.rb
|
124
|
+
- lib/terraspace_plugin_azurerm/interfaces/expander.rb
|
125
|
+
- lib/terraspace_plugin_azurerm/interfaces/layer.rb
|
126
|
+
- lib/terraspace_plugin_azurerm/version.rb
|
127
|
+
- terraspace_plugin_azurerm.gemspec
|
128
|
+
homepage: https://github.com/boltops-tools/terraspace_plugin_azurerm
|
129
|
+
licenses:
|
130
|
+
- Apache2.0
|
131
|
+
metadata:
|
132
|
+
homepage_uri: https://github.com/boltops-tools/terraspace_plugin_azurerm
|
133
|
+
post_install_message:
|
134
|
+
rdoc_options: []
|
135
|
+
require_paths:
|
136
|
+
- lib
|
137
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 2.3.0
|
142
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
requirements: []
|
148
|
+
rubygems_version: 3.1.2
|
149
|
+
signing_key:
|
150
|
+
specification_version: 4
|
151
|
+
summary: Terraspace Azurerm Cloud Plugin
|
152
|
+
test_files: []
|