|
1 | 1 | # Initial Setup |
2 | 2 |
|
| 3 | +import Tabs from '@theme/Tabs'; |
| 4 | +import TabItem from '@theme/TabItem'; |
| 5 | + |
3 | 6 | To configure Gruntwork Pipelines in a new GitHub repository, complete the following steps (which are explained in detail below): |
4 | 7 |
|
5 | 8 | 1. Create an `infrastructure-live` repository. |
@@ -61,6 +64,9 @@ repository { |
61 | 64 | } |
62 | 65 | ``` |
63 | 66 |
|
| 67 | +<Tabs> |
| 68 | +<TabItem value="aws" label="AWS" default> |
| 69 | + |
64 | 70 | ```hcl title=".gruntwork/environment.hcl" |
65 | 71 | environment "dev" { |
66 | 72 | filter { |
@@ -93,10 +99,97 @@ environment "prod" { |
93 | 99 |
|
94 | 100 | :::tip |
95 | 101 |
|
| 102 | +Learn more about how Pipelines authenticates to AWS in the [Authenticating to AWS](/2.0/docs/pipelines/concepts/cloud-auth/aws) page. |
| 103 | + |
| 104 | +::: |
| 105 | + |
| 106 | +:::tip |
| 107 | + |
96 | 108 | Check out the [aws block](/2.0/reference/pipelines/configurations-as-code/#aws-blocks) for more information on how to configure Pipelines to authenticate with AWS conveniently. |
97 | 109 |
|
98 | 110 | ::: |
99 | 111 |
|
| 112 | +</TabItem> |
| 113 | +<TabItem value="azure" label="Azure"> |
| 114 | + |
| 115 | +```hcl title=".gruntwork/environment.hcl" |
| 116 | +environment "dev" { |
| 117 | + filter { |
| 118 | + paths = ["dev/*"] |
| 119 | + } |
| 120 | +
|
| 121 | + authentication { |
| 122 | + azure_oidc { |
| 123 | + tenant_id = "141052b1-f3e4-49c2-91a3-dc349beb66f1" |
| 124 | + subscription_id = "a0afca72-e70c-4b57-acb1-e4c9019e59be" |
| 125 | +
|
| 126 | + plan_client_id = "b5315418-c05e-471d-9b68-13695fb4863f" |
| 127 | + apply_client_id = "9b4eb942-b48a-4ab8-bc47-f3a92068ae88" |
| 128 | + } |
| 129 | + } |
| 130 | +} |
| 131 | +
|
| 132 | +environment "prod" { |
| 133 | + filter { |
| 134 | + paths = ["prod/*"] |
| 135 | + } |
| 136 | +
|
| 137 | + authentication { |
| 138 | + azure_oidc { |
| 139 | + tenant_id = "141052b1-f3e4-49c2-91a3-dc349beb66f1" |
| 140 | + subscription_id = "b0bfdb73-f80d-5c68-bdc2-f5d9129f70cf" |
| 141 | +
|
| 142 | + plan_client_id = "c6426529-d16f-582e-ad79-04a93fb9974e" |
| 143 | + apply_client_id = "ac5fc053-c59b-5bc9-cd58-049b42179a99" |
| 144 | + } |
| 145 | + } |
| 146 | +} |
| 147 | +``` |
| 148 | + |
| 149 | +:::tip |
| 150 | + |
| 151 | +Learn more about how Pipelines authenticates to Azure in the [Authenticating to Azure](/2.0/docs/pipelines/concepts/cloud-auth/azure) page. |
| 152 | + |
| 153 | +::: |
| 154 | + |
| 155 | +</TabItem> |
| 156 | +<TabItem value="custom" label="Custom"> |
| 157 | + |
| 158 | +```hcl title=".gruntwork/environment.hcl" |
| 159 | +environment "dev" { |
| 160 | + filter { |
| 161 | + paths = ["dev/*"] |
| 162 | + } |
| 163 | +
|
| 164 | + authentication { |
| 165 | + custom { |
| 166 | + auth_provider_cmd = "./scripts/custom-auth-dev.sh" |
| 167 | + } |
| 168 | + } |
| 169 | +} |
| 170 | +
|
| 171 | +environment "prod" { |
| 172 | + filter { |
| 173 | + paths = ["prod/*"] |
| 174 | + } |
| 175 | +
|
| 176 | + authentication { |
| 177 | + custom { |
| 178 | + auth_provider_cmd = "./scripts/custom-auth-prod.sh" |
| 179 | + } |
| 180 | + } |
| 181 | +} |
| 182 | +``` |
| 183 | + |
| 184 | +:::tip |
| 185 | + |
| 186 | +Learn more about how Pipelines can authenticate with custom authentication in the [Custom Authentication](/2.0/docs/pipelines/concepts/cloud-auth/custom) page. |
| 187 | + |
| 188 | +::: |
| 189 | + |
| 190 | +</TabItem> |
| 191 | +</Tabs> |
| 192 | + |
100 | 193 | ## Creating `.github/workflows/pipelines.yml` |
101 | 194 |
|
102 | 195 | Create a `.github/workflows/pipelines.yml` file in the root of your `infrastructure-live` repository with the following content: |
|
0 commit comments