azd 0.9.1 → 0.9.2

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: 44c75b89ce6718f2321df9fb9921213eb82cdf1ac32c15c9ac6e2a91f814943d
4
- data.tar.gz: 4cda4bc30b570cc23dee4a801e43daf96602e2e4bc5278cbc9ed6b06f51871cd
3
+ metadata.gz: cd35f629654dd5b54ccbdd26d81546c3d9a4dc966283ff9ea743c8ac2b4deec4
4
+ data.tar.gz: d9bff27383c83a0844752edd8d28e6edf75fb0e92eac479ba00c056d0ee3aadc
5
5
  SHA512:
6
- metadata.gz: d45841668d6cd012fe198ebbb11ec04b2b5547450184c1cc5a858cfe359c3d1c82e95e462fffb6f896fc9ab11b98494f5a5f5c105d8e16ba2bbb456bafe39d3b
7
- data.tar.gz: 4db2bede71d7e2fb4a2a9502ff1dce5b9806ea7a494c0500709154106b398be8f8689ee853629c46453f31ffc357838b49441fc02b1101fb6164a0e54270e354
6
+ metadata.gz: 9f0c73d402ae1a28af7e8797a15b633c0427f0bbcc3a27cfcfe56c37654837653b9acabbe300c8cd5b60aa8295b626420da7b82b7f13931a3d4db861adb45ea5
7
+ data.tar.gz: d2f7a627ca601990125839448aa386270aa244675727afbaea04bcdcf0026c5281b48647ef494ebe8fe7aa2591cc170574a62b3c37f52cf6fad8f703d64bffd4
data/README.md CHANGED
@@ -1,2 +1,41 @@
1
- # azure-dev-gem
2
- Azure Developer CLI generators gem
1
+ # Azure Developer CLI generators Ruby Gem
2
+
3
+ :warning: Work in progress! Issues or PR are welcome!
4
+
5
+ This Gem simplies integrating and using Azure Developer CLI (`azd`) in your ruby projects. For now it works only with Ruby on Rails and is built as a Rails Generator.
6
+
7
+ ## Usage
8
+
9
+ Add the Gem to your `Gemfile` with Bundler:
10
+ ```shell
11
+ bundle add azd --group development
12
+ ```
13
+
14
+ Alternatively, you can also add the following line to your `Gemfile`:
15
+ ```ruby
16
+ gem "azd", "~> 0.9.1"
17
+ ```
18
+
19
+ In your Rails application directory run:
20
+ ```shell
21
+ bin/rails generate azd:install
22
+ ```
23
+
24
+ This will add the following to your application:
25
+ * `azure.yaml`: `azd`'s configuration file.
26
+ * `infra`: a directory containing Bicep templates to provision the infrastructure.
27
+
28
+ ## Azure Developer CLI (azd) in a nutshell
29
+
30
+ Azure Developer CLI (`azd`) is a command line interface built on top of Azure CLI (`az`) that simplifies the process of building, provisioning and deploying applications to Azure.
31
+
32
+ It offers a streamlined workflow for Azure development, enabling faster and more efficient development cycles.
33
+
34
+
35
+ ## Future
36
+
37
+ * Add MySQL as a target database
38
+ * Add Redis for caching and messaging
39
+ * Add other types of Ruby applications
40
+ * Allow for Terraform templates?
41
+ * Let us know what would be most interesting to you by opening an Issue!
@@ -1,6 +1,6 @@
1
1
  name: <%= Rails.application.class.module_parent_name.downcase %>
2
2
  services:
3
- azure-rails-starter:
3
+ app:
4
4
  language: js
5
5
  project: ./
6
6
  host: containerapp
@@ -16,13 +16,7 @@ resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
16
16
  properties: {
17
17
  tenantId: subscription().tenantId
18
18
  sku: { family: 'A', name: 'standard' }
19
- accessPolicies: !empty(userIdentity.properties.principalId) ? [
20
- {
21
- objectId: userIdentity.properties.principalId
22
- permissions: { secrets: [ 'get', 'list' ] }
23
- tenantId: subscription().tenantId
24
- }
25
- ] : []
19
+ enableRbacAuthorization: true
26
20
  }
27
21
  }
28
22
 
@@ -61,7 +61,7 @@ var resourceToken = toLower(uniqueString(subscription().id, environmentName, loc
61
61
  // Microsoft.Web/sites for appservice, function
62
62
  // Example usage:
63
63
  // tags: union(tags, { 'azd-service-name': apiServiceName })
64
- var appServiceName = 'azure-rails-starter'
64
+ var appServiceName = 'app'
65
65
 
66
66
  // Organize resources in a resource group
67
67
  resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
@@ -148,11 +148,11 @@ module keyVault './core/security/keyvault.bicep' = {
148
148
  }
149
149
  }
150
150
 
151
- module keyVaultAccess './core/security/keyvault-access.bicep' = {
152
- name: 'keyvault-access'
151
+ module keyVaultRoleAssignment './core/security/role.bicep' = {
152
+ name: 'keyvault-role-assignment'
153
153
  scope: resourceGroup
154
154
  params: {
155
- keyVaultName: keyVault.outputs.name
155
+ roleDefinitionId: '4633458b-17de-408a-b874-0445c86b69e6'
156
156
  principalId: railsIdentity.outputs.principalId
157
157
  }
158
158
  }
@@ -214,7 +214,7 @@ module rails 'rails.bicep' = {
214
214
  dependsOn: [
215
215
  keyVaultSecretDatabaseUrl
216
216
  keyVaultSecretSecretKeyBase
217
- keyVaultAccess
217
+ keyVaultRoleAssignment
218
218
  ]
219
219
  }
220
220
 
@@ -19,7 +19,7 @@
19
19
  "value": "${RAILS_MASTER_KEY}"
20
20
  },
21
21
  "postgresDatabaseName": {
22
- "value": "${SERVICE_RAILS_DATABASE_NAME=azure_rails_starter_production}"
22
+ "value": "${SERVICE_RAILS_DATABASE_NAME=<%= Rails.application.class.module_parent_name.downcase %>_production}"
23
23
  }
24
24
  }
25
- }
25
+ }
@@ -17,7 +17,7 @@ param containerAppsEnvironmentName string
17
17
  param containerRegistryName string
18
18
 
19
19
  @description('Service name (will be added as tag "azd-service-name")')
20
- param serviceName string = 'rails'
20
+ param serviceName string
21
21
 
22
22
  @description('If true re-use existing Azure Container App')
23
23
  param exists bool
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominique Broeglin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-09 00:00:00.000000000 Z
11
+ date: 2024-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -31,7 +31,7 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '99'
33
33
  description: Contains generators to make a rails application azd compatible
34
- email:
34
+ email:
35
35
  executables: []
36
36
  extensions: []
37
37
  extra_rdoc_files: []
@@ -85,15 +85,15 @@ files:
85
85
  - lib/generators/templates/infra/core/storage/storage-account.bicep
86
86
  - lib/generators/templates/infra/core/testing/loadtesting.bicep
87
87
  - lib/generators/templates/infra/identity.bicep
88
- - lib/generators/templates/infra/main.bicep
89
- - lib/generators/templates/infra/main.parameters.json
88
+ - lib/generators/templates/infra/main.bicep.tt
89
+ - lib/generators/templates/infra/main.parameters.json.tt
90
90
  - lib/generators/templates/infra/rails.bicep
91
91
  homepage: https://github.com/dbroeglin/azure-dev-gem
92
92
  licenses:
93
93
  - MIT
94
94
  metadata:
95
95
  source_code_uri: https://github.com/dbroeglin/azure-dev-gem
96
- post_install_message:
96
+ post_install_message:
97
97
  rdoc_options: []
98
98
  require_paths:
99
99
  - lib
@@ -108,8 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.5.3
112
- signing_key:
111
+ rubygems_version: 3.5.9
112
+ signing_key:
113
113
  specification_version: 4
114
114
  summary: Azure Developer CLI generators gem
115
115
  test_files: []