github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/amplify/app.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package amplify 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides an Amplify App resource, a fullstack serverless app hosted on the [AWS Amplify Console](https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html). 15 // 16 // > **Note:** When you create/update an Amplify App from the provider, you may end up with the error "BadRequestException: You should at least provide one valid token" because of authentication issues. See the section "Repository with Tokens" below. 17 // 18 // ## Example Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := amplify.NewApp(ctx, "example", &lify.AppArgs{ 34 // Name: pulumi.String("example"), 35 // Repository: pulumi.String("https://github.com/example/app"), 36 // BuildSpec: pulumi.String(`version: 0.1 37 // 38 // frontend: 39 // 40 // phases: 41 // preBuild: 42 // commands: 43 // - yarn install 44 // build: 45 // commands: 46 // - yarn run build 47 // artifacts: 48 // baseDirectory: build 49 // files: 50 // - '**/*' 51 // cache: 52 // paths: 53 // - node_modules/**/* 54 // 55 // `), 56 // 57 // CustomRules: amplify.AppCustomRuleArray{ 58 // &lify.AppCustomRuleArgs{ 59 // Source: pulumi.String("/<*>"), 60 // Status: pulumi.String("404"), 61 // Target: pulumi.String("/index.html"), 62 // }, 63 // }, 64 // EnvironmentVariables: pulumi.StringMap{ 65 // "ENV": pulumi.String("test"), 66 // }, 67 // }) 68 // if err != nil { 69 // return err 70 // } 71 // return nil 72 // }) 73 // } 74 // 75 // ``` 76 // <!--End PulumiCodeChooser --> 77 // 78 // ### Repository with Tokens 79 // 80 // If you create a new Amplify App with the `repository` argument, you also need to set `oauthToken` or `accessToken` for authentication. For GitHub, get a [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) and set `accessToken` as follows: 81 // 82 // <!--Start PulumiCodeChooser --> 83 // ```go 84 // package main 85 // 86 // import ( 87 // 88 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify" 89 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 90 // 91 // ) 92 // 93 // func main() { 94 // pulumi.Run(func(ctx *pulumi.Context) error { 95 // _, err := amplify.NewApp(ctx, "example", &lify.AppArgs{ 96 // Name: pulumi.String("example"), 97 // Repository: pulumi.String("https://github.com/example/app"), 98 // AccessToken: pulumi.String("..."), 99 // }) 100 // if err != nil { 101 // return err 102 // } 103 // return nil 104 // }) 105 // } 106 // 107 // ``` 108 // <!--End PulumiCodeChooser --> 109 // 110 // You can omit `accessToken` if you import an existing Amplify App created by the Amplify Console (using OAuth for authentication). 111 // 112 // ### Auto Branch Creation 113 // 114 // <!--Start PulumiCodeChooser --> 115 // ```go 116 // package main 117 // 118 // import ( 119 // 120 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify" 121 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 122 // 123 // ) 124 // 125 // func main() { 126 // pulumi.Run(func(ctx *pulumi.Context) error { 127 // _, err := amplify.NewApp(ctx, "example", &lify.AppArgs{ 128 // Name: pulumi.String("example"), 129 // EnableAutoBranchCreation: pulumi.Bool(true), 130 // AutoBranchCreationPatterns: pulumi.StringArray{ 131 // pulumi.String("*"), 132 // pulumi.String("*/**"), 133 // }, 134 // AutoBranchCreationConfig: &lify.AppAutoBranchCreationConfigArgs{ 135 // EnableAutoBuild: pulumi.Bool(true), 136 // }, 137 // }) 138 // if err != nil { 139 // return err 140 // } 141 // return nil 142 // }) 143 // } 144 // 145 // ``` 146 // <!--End PulumiCodeChooser --> 147 // 148 // ### Basic Authorization 149 // 150 // <!--Start PulumiCodeChooser --> 151 // ```go 152 // package main 153 // 154 // import ( 155 // 156 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify" 157 // "github.com/pulumi/pulumi-std/sdk/go/std" 158 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 159 // 160 // ) 161 // 162 // func main() { 163 // pulumi.Run(func(ctx *pulumi.Context) error { 164 // invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{ 165 // Input: "username1:password1", 166 // }, nil) 167 // if err != nil { 168 // return err 169 // } 170 // _, err = amplify.NewApp(ctx, "example", &lify.AppArgs{ 171 // Name: pulumi.String("example"), 172 // EnableBasicAuth: pulumi.Bool(true), 173 // BasicAuthCredentials: invokeBase64encode.Result, 174 // }) 175 // if err != nil { 176 // return err 177 // } 178 // return nil 179 // }) 180 // } 181 // 182 // ``` 183 // <!--End PulumiCodeChooser --> 184 // 185 // ### Rewrites and Redirects 186 // 187 // <!--Start PulumiCodeChooser --> 188 // ```go 189 // package main 190 // 191 // import ( 192 // 193 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify" 194 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 195 // 196 // ) 197 // 198 // func main() { 199 // pulumi.Run(func(ctx *pulumi.Context) error { 200 // _, err := amplify.NewApp(ctx, "example", &lify.AppArgs{ 201 // Name: pulumi.String("example"), 202 // CustomRules: amplify.AppCustomRuleArray{ 203 // &lify.AppCustomRuleArgs{ 204 // Source: pulumi.String("/api/<*>"), 205 // Status: pulumi.String("200"), 206 // Target: pulumi.String("https://api.example.com/api/<*>"), 207 // }, 208 // &lify.AppCustomRuleArgs{ 209 // Source: pulumi.String("</^[^.]+$|\\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/>"), 210 // Status: pulumi.String("200"), 211 // Target: pulumi.String("/index.html"), 212 // }, 213 // }, 214 // }) 215 // if err != nil { 216 // return err 217 // } 218 // return nil 219 // }) 220 // } 221 // 222 // ``` 223 // <!--End PulumiCodeChooser --> 224 // 225 // ### Custom Image 226 // 227 // <!--Start PulumiCodeChooser --> 228 // ```go 229 // package main 230 // 231 // import ( 232 // 233 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify" 234 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 235 // 236 // ) 237 // 238 // func main() { 239 // pulumi.Run(func(ctx *pulumi.Context) error { 240 // _, err := amplify.NewApp(ctx, "example", &lify.AppArgs{ 241 // Name: pulumi.String("example"), 242 // EnvironmentVariables: pulumi.StringMap{ 243 // "_CUSTOM_IMAGE": pulumi.String("node:16"), 244 // }, 245 // }) 246 // if err != nil { 247 // return err 248 // } 249 // return nil 250 // }) 251 // } 252 // 253 // ``` 254 // <!--End PulumiCodeChooser --> 255 // 256 // ### Custom Headers 257 // 258 // <!--Start PulumiCodeChooser --> 259 // ```go 260 // package main 261 // 262 // import ( 263 // 264 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify" 265 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 266 // 267 // ) 268 // 269 // func main() { 270 // pulumi.Run(func(ctx *pulumi.Context) error { 271 // _, err := amplify.NewApp(ctx, "example", &lify.AppArgs{ 272 // Name: pulumi.String("example"), 273 // CustomHeaders: pulumi.String(`customHeaders: 274 // - pattern: '**' 275 // headers: 276 // - key: 'Strict-Transport-Security' 277 // value: 'max-age=31536000; includeSubDomains' 278 // - key: 'X-Frame-Options' 279 // value: 'SAMEORIGIN' 280 // - key: 'X-XSS-Protection' 281 // value: '1; mode=block' 282 // - key: 'X-Content-Type-Options' 283 // value: 'nosniff' 284 // - key: 'Content-Security-Policy' 285 // value: "default-src 'self'" 286 // 287 // `), 288 // 289 // }) 290 // if err != nil { 291 // return err 292 // } 293 // return nil 294 // }) 295 // } 296 // 297 // ``` 298 // <!--End PulumiCodeChooser --> 299 // 300 // ## Import 301 // 302 // Using `pulumi import`, import Amplify App using Amplify App ID (appId). For example: 303 // 304 // ```sh 305 // $ pulumi import aws:amplify/app:App example d2ypk4k47z8u6 306 // ``` 307 // App ID can be obtained from App ARN (e.g., `arn:aws:amplify:us-east-1:12345678:apps/d2ypk4k47z8u6`). 308 type App struct { 309 pulumi.CustomResourceState 310 311 // Personal access token for a third-party source control system for an Amplify app. This token must have write access to the relevant repo to create a webhook and a read-only deploy key for the Amplify project. The token is not stored, so after applying this attribute can be removed and the setup token deleted. 312 AccessToken pulumi.StringPtrOutput `pulumi:"accessToken"` 313 // ARN of the Amplify app. 314 Arn pulumi.StringOutput `pulumi:"arn"` 315 // Automated branch creation configuration for an Amplify app. An `autoBranchCreationConfig` block is documented below. 316 AutoBranchCreationConfig AppAutoBranchCreationConfigOutput `pulumi:"autoBranchCreationConfig"` 317 // Automated branch creation glob patterns for an Amplify app. 318 AutoBranchCreationPatterns pulumi.StringArrayOutput `pulumi:"autoBranchCreationPatterns"` 319 // Credentials for basic authorization for an Amplify app. 320 BasicAuthCredentials pulumi.StringPtrOutput `pulumi:"basicAuthCredentials"` 321 // The [build specification](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html) (build spec) for an Amplify app. 322 BuildSpec pulumi.StringOutput `pulumi:"buildSpec"` 323 // The [custom HTTP headers](https://docs.aws.amazon.com/amplify/latest/userguide/custom-headers.html) for an Amplify app. 324 CustomHeaders pulumi.StringOutput `pulumi:"customHeaders"` 325 // Custom rewrite and redirect rules for an Amplify app. A `customRule` block is documented below. 326 CustomRules AppCustomRuleArrayOutput `pulumi:"customRules"` 327 // Default domain for the Amplify app. 328 DefaultDomain pulumi.StringOutput `pulumi:"defaultDomain"` 329 // Description for an Amplify app. 330 Description pulumi.StringPtrOutput `pulumi:"description"` 331 // Enables automated branch creation for an Amplify app. 332 EnableAutoBranchCreation pulumi.BoolPtrOutput `pulumi:"enableAutoBranchCreation"` 333 // Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. 334 EnableBasicAuth pulumi.BoolPtrOutput `pulumi:"enableBasicAuth"` 335 // Enables auto-building of branches for the Amplify App. 336 EnableBranchAutoBuild pulumi.BoolPtrOutput `pulumi:"enableBranchAutoBuild"` 337 // Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. 338 EnableBranchAutoDeletion pulumi.BoolPtrOutput `pulumi:"enableBranchAutoDeletion"` 339 // Environment variables map for an Amplify app. 340 EnvironmentVariables pulumi.StringMapOutput `pulumi:"environmentVariables"` 341 // AWS Identity and Access Management (IAM) service role for an Amplify app. 342 IamServiceRoleArn pulumi.StringPtrOutput `pulumi:"iamServiceRoleArn"` 343 // Name for an Amplify app. 344 Name pulumi.StringOutput `pulumi:"name"` 345 // OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key. The OAuth token is not stored. 346 OauthToken pulumi.StringPtrOutput `pulumi:"oauthToken"` 347 // Platform or framework for an Amplify app. Valid values: `WEB`, `WEB_COMPUTE`. Default value: `WEB`. 348 Platform pulumi.StringPtrOutput `pulumi:"platform"` 349 // Describes the information about a production branch for an Amplify app. A `productionBranch` block is documented below. 350 ProductionBranches AppProductionBranchArrayOutput `pulumi:"productionBranches"` 351 // Repository for an Amplify app. 352 Repository pulumi.StringPtrOutput `pulumi:"repository"` 353 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 354 Tags pulumi.StringMapOutput `pulumi:"tags"` 355 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 356 // 357 // Deprecated: Please use `tags` instead. 358 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 359 } 360 361 // NewApp registers a new resource with the given unique name, arguments, and options. 362 func NewApp(ctx *pulumi.Context, 363 name string, args *AppArgs, opts ...pulumi.ResourceOption) (*App, error) { 364 if args == nil { 365 args = &AppArgs{} 366 } 367 368 if args.AccessToken != nil { 369 args.AccessToken = pulumi.ToSecret(args.AccessToken).(pulumi.StringPtrInput) 370 } 371 if args.BasicAuthCredentials != nil { 372 args.BasicAuthCredentials = pulumi.ToSecret(args.BasicAuthCredentials).(pulumi.StringPtrInput) 373 } 374 if args.OauthToken != nil { 375 args.OauthToken = pulumi.ToSecret(args.OauthToken).(pulumi.StringPtrInput) 376 } 377 secrets := pulumi.AdditionalSecretOutputs([]string{ 378 "accessToken", 379 "basicAuthCredentials", 380 "oauthToken", 381 }) 382 opts = append(opts, secrets) 383 opts = internal.PkgResourceDefaultOpts(opts) 384 var resource App 385 err := ctx.RegisterResource("aws:amplify/app:App", name, args, &resource, opts...) 386 if err != nil { 387 return nil, err 388 } 389 return &resource, nil 390 } 391 392 // GetApp gets an existing App resource's state with the given name, ID, and optional 393 // state properties that are used to uniquely qualify the lookup (nil if not required). 394 func GetApp(ctx *pulumi.Context, 395 name string, id pulumi.IDInput, state *AppState, opts ...pulumi.ResourceOption) (*App, error) { 396 var resource App 397 err := ctx.ReadResource("aws:amplify/app:App", name, id, state, &resource, opts...) 398 if err != nil { 399 return nil, err 400 } 401 return &resource, nil 402 } 403 404 // Input properties used for looking up and filtering App resources. 405 type appState struct { 406 // Personal access token for a third-party source control system for an Amplify app. This token must have write access to the relevant repo to create a webhook and a read-only deploy key for the Amplify project. The token is not stored, so after applying this attribute can be removed and the setup token deleted. 407 AccessToken *string `pulumi:"accessToken"` 408 // ARN of the Amplify app. 409 Arn *string `pulumi:"arn"` 410 // Automated branch creation configuration for an Amplify app. An `autoBranchCreationConfig` block is documented below. 411 AutoBranchCreationConfig *AppAutoBranchCreationConfig `pulumi:"autoBranchCreationConfig"` 412 // Automated branch creation glob patterns for an Amplify app. 413 AutoBranchCreationPatterns []string `pulumi:"autoBranchCreationPatterns"` 414 // Credentials for basic authorization for an Amplify app. 415 BasicAuthCredentials *string `pulumi:"basicAuthCredentials"` 416 // The [build specification](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html) (build spec) for an Amplify app. 417 BuildSpec *string `pulumi:"buildSpec"` 418 // The [custom HTTP headers](https://docs.aws.amazon.com/amplify/latest/userguide/custom-headers.html) for an Amplify app. 419 CustomHeaders *string `pulumi:"customHeaders"` 420 // Custom rewrite and redirect rules for an Amplify app. A `customRule` block is documented below. 421 CustomRules []AppCustomRule `pulumi:"customRules"` 422 // Default domain for the Amplify app. 423 DefaultDomain *string `pulumi:"defaultDomain"` 424 // Description for an Amplify app. 425 Description *string `pulumi:"description"` 426 // Enables automated branch creation for an Amplify app. 427 EnableAutoBranchCreation *bool `pulumi:"enableAutoBranchCreation"` 428 // Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. 429 EnableBasicAuth *bool `pulumi:"enableBasicAuth"` 430 // Enables auto-building of branches for the Amplify App. 431 EnableBranchAutoBuild *bool `pulumi:"enableBranchAutoBuild"` 432 // Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. 433 EnableBranchAutoDeletion *bool `pulumi:"enableBranchAutoDeletion"` 434 // Environment variables map for an Amplify app. 435 EnvironmentVariables map[string]string `pulumi:"environmentVariables"` 436 // AWS Identity and Access Management (IAM) service role for an Amplify app. 437 IamServiceRoleArn *string `pulumi:"iamServiceRoleArn"` 438 // Name for an Amplify app. 439 Name *string `pulumi:"name"` 440 // OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key. The OAuth token is not stored. 441 OauthToken *string `pulumi:"oauthToken"` 442 // Platform or framework for an Amplify app. Valid values: `WEB`, `WEB_COMPUTE`. Default value: `WEB`. 443 Platform *string `pulumi:"platform"` 444 // Describes the information about a production branch for an Amplify app. A `productionBranch` block is documented below. 445 ProductionBranches []AppProductionBranch `pulumi:"productionBranches"` 446 // Repository for an Amplify app. 447 Repository *string `pulumi:"repository"` 448 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 449 Tags map[string]string `pulumi:"tags"` 450 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 451 // 452 // Deprecated: Please use `tags` instead. 453 TagsAll map[string]string `pulumi:"tagsAll"` 454 } 455 456 type AppState struct { 457 // Personal access token for a third-party source control system for an Amplify app. This token must have write access to the relevant repo to create a webhook and a read-only deploy key for the Amplify project. The token is not stored, so after applying this attribute can be removed and the setup token deleted. 458 AccessToken pulumi.StringPtrInput 459 // ARN of the Amplify app. 460 Arn pulumi.StringPtrInput 461 // Automated branch creation configuration for an Amplify app. An `autoBranchCreationConfig` block is documented below. 462 AutoBranchCreationConfig AppAutoBranchCreationConfigPtrInput 463 // Automated branch creation glob patterns for an Amplify app. 464 AutoBranchCreationPatterns pulumi.StringArrayInput 465 // Credentials for basic authorization for an Amplify app. 466 BasicAuthCredentials pulumi.StringPtrInput 467 // The [build specification](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html) (build spec) for an Amplify app. 468 BuildSpec pulumi.StringPtrInput 469 // The [custom HTTP headers](https://docs.aws.amazon.com/amplify/latest/userguide/custom-headers.html) for an Amplify app. 470 CustomHeaders pulumi.StringPtrInput 471 // Custom rewrite and redirect rules for an Amplify app. A `customRule` block is documented below. 472 CustomRules AppCustomRuleArrayInput 473 // Default domain for the Amplify app. 474 DefaultDomain pulumi.StringPtrInput 475 // Description for an Amplify app. 476 Description pulumi.StringPtrInput 477 // Enables automated branch creation for an Amplify app. 478 EnableAutoBranchCreation pulumi.BoolPtrInput 479 // Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. 480 EnableBasicAuth pulumi.BoolPtrInput 481 // Enables auto-building of branches for the Amplify App. 482 EnableBranchAutoBuild pulumi.BoolPtrInput 483 // Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. 484 EnableBranchAutoDeletion pulumi.BoolPtrInput 485 // Environment variables map for an Amplify app. 486 EnvironmentVariables pulumi.StringMapInput 487 // AWS Identity and Access Management (IAM) service role for an Amplify app. 488 IamServiceRoleArn pulumi.StringPtrInput 489 // Name for an Amplify app. 490 Name pulumi.StringPtrInput 491 // OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key. The OAuth token is not stored. 492 OauthToken pulumi.StringPtrInput 493 // Platform or framework for an Amplify app. Valid values: `WEB`, `WEB_COMPUTE`. Default value: `WEB`. 494 Platform pulumi.StringPtrInput 495 // Describes the information about a production branch for an Amplify app. A `productionBranch` block is documented below. 496 ProductionBranches AppProductionBranchArrayInput 497 // Repository for an Amplify app. 498 Repository pulumi.StringPtrInput 499 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 500 Tags pulumi.StringMapInput 501 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 502 // 503 // Deprecated: Please use `tags` instead. 504 TagsAll pulumi.StringMapInput 505 } 506 507 func (AppState) ElementType() reflect.Type { 508 return reflect.TypeOf((*appState)(nil)).Elem() 509 } 510 511 type appArgs struct { 512 // Personal access token for a third-party source control system for an Amplify app. This token must have write access to the relevant repo to create a webhook and a read-only deploy key for the Amplify project. The token is not stored, so after applying this attribute can be removed and the setup token deleted. 513 AccessToken *string `pulumi:"accessToken"` 514 // Automated branch creation configuration for an Amplify app. An `autoBranchCreationConfig` block is documented below. 515 AutoBranchCreationConfig *AppAutoBranchCreationConfig `pulumi:"autoBranchCreationConfig"` 516 // Automated branch creation glob patterns for an Amplify app. 517 AutoBranchCreationPatterns []string `pulumi:"autoBranchCreationPatterns"` 518 // Credentials for basic authorization for an Amplify app. 519 BasicAuthCredentials *string `pulumi:"basicAuthCredentials"` 520 // The [build specification](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html) (build spec) for an Amplify app. 521 BuildSpec *string `pulumi:"buildSpec"` 522 // The [custom HTTP headers](https://docs.aws.amazon.com/amplify/latest/userguide/custom-headers.html) for an Amplify app. 523 CustomHeaders *string `pulumi:"customHeaders"` 524 // Custom rewrite and redirect rules for an Amplify app. A `customRule` block is documented below. 525 CustomRules []AppCustomRule `pulumi:"customRules"` 526 // Description for an Amplify app. 527 Description *string `pulumi:"description"` 528 // Enables automated branch creation for an Amplify app. 529 EnableAutoBranchCreation *bool `pulumi:"enableAutoBranchCreation"` 530 // Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. 531 EnableBasicAuth *bool `pulumi:"enableBasicAuth"` 532 // Enables auto-building of branches for the Amplify App. 533 EnableBranchAutoBuild *bool `pulumi:"enableBranchAutoBuild"` 534 // Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. 535 EnableBranchAutoDeletion *bool `pulumi:"enableBranchAutoDeletion"` 536 // Environment variables map for an Amplify app. 537 EnvironmentVariables map[string]string `pulumi:"environmentVariables"` 538 // AWS Identity and Access Management (IAM) service role for an Amplify app. 539 IamServiceRoleArn *string `pulumi:"iamServiceRoleArn"` 540 // Name for an Amplify app. 541 Name *string `pulumi:"name"` 542 // OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key. The OAuth token is not stored. 543 OauthToken *string `pulumi:"oauthToken"` 544 // Platform or framework for an Amplify app. Valid values: `WEB`, `WEB_COMPUTE`. Default value: `WEB`. 545 Platform *string `pulumi:"platform"` 546 // Repository for an Amplify app. 547 Repository *string `pulumi:"repository"` 548 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 549 Tags map[string]string `pulumi:"tags"` 550 } 551 552 // The set of arguments for constructing a App resource. 553 type AppArgs struct { 554 // Personal access token for a third-party source control system for an Amplify app. This token must have write access to the relevant repo to create a webhook and a read-only deploy key for the Amplify project. The token is not stored, so after applying this attribute can be removed and the setup token deleted. 555 AccessToken pulumi.StringPtrInput 556 // Automated branch creation configuration for an Amplify app. An `autoBranchCreationConfig` block is documented below. 557 AutoBranchCreationConfig AppAutoBranchCreationConfigPtrInput 558 // Automated branch creation glob patterns for an Amplify app. 559 AutoBranchCreationPatterns pulumi.StringArrayInput 560 // Credentials for basic authorization for an Amplify app. 561 BasicAuthCredentials pulumi.StringPtrInput 562 // The [build specification](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html) (build spec) for an Amplify app. 563 BuildSpec pulumi.StringPtrInput 564 // The [custom HTTP headers](https://docs.aws.amazon.com/amplify/latest/userguide/custom-headers.html) for an Amplify app. 565 CustomHeaders pulumi.StringPtrInput 566 // Custom rewrite and redirect rules for an Amplify app. A `customRule` block is documented below. 567 CustomRules AppCustomRuleArrayInput 568 // Description for an Amplify app. 569 Description pulumi.StringPtrInput 570 // Enables automated branch creation for an Amplify app. 571 EnableAutoBranchCreation pulumi.BoolPtrInput 572 // Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. 573 EnableBasicAuth pulumi.BoolPtrInput 574 // Enables auto-building of branches for the Amplify App. 575 EnableBranchAutoBuild pulumi.BoolPtrInput 576 // Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. 577 EnableBranchAutoDeletion pulumi.BoolPtrInput 578 // Environment variables map for an Amplify app. 579 EnvironmentVariables pulumi.StringMapInput 580 // AWS Identity and Access Management (IAM) service role for an Amplify app. 581 IamServiceRoleArn pulumi.StringPtrInput 582 // Name for an Amplify app. 583 Name pulumi.StringPtrInput 584 // OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key. The OAuth token is not stored. 585 OauthToken pulumi.StringPtrInput 586 // Platform or framework for an Amplify app. Valid values: `WEB`, `WEB_COMPUTE`. Default value: `WEB`. 587 Platform pulumi.StringPtrInput 588 // Repository for an Amplify app. 589 Repository pulumi.StringPtrInput 590 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 591 Tags pulumi.StringMapInput 592 } 593 594 func (AppArgs) ElementType() reflect.Type { 595 return reflect.TypeOf((*appArgs)(nil)).Elem() 596 } 597 598 type AppInput interface { 599 pulumi.Input 600 601 ToAppOutput() AppOutput 602 ToAppOutputWithContext(ctx context.Context) AppOutput 603 } 604 605 func (*App) ElementType() reflect.Type { 606 return reflect.TypeOf((**App)(nil)).Elem() 607 } 608 609 func (i *App) ToAppOutput() AppOutput { 610 return i.ToAppOutputWithContext(context.Background()) 611 } 612 613 func (i *App) ToAppOutputWithContext(ctx context.Context) AppOutput { 614 return pulumi.ToOutputWithContext(ctx, i).(AppOutput) 615 } 616 617 // AppArrayInput is an input type that accepts AppArray and AppArrayOutput values. 618 // You can construct a concrete instance of `AppArrayInput` via: 619 // 620 // AppArray{ AppArgs{...} } 621 type AppArrayInput interface { 622 pulumi.Input 623 624 ToAppArrayOutput() AppArrayOutput 625 ToAppArrayOutputWithContext(context.Context) AppArrayOutput 626 } 627 628 type AppArray []AppInput 629 630 func (AppArray) ElementType() reflect.Type { 631 return reflect.TypeOf((*[]*App)(nil)).Elem() 632 } 633 634 func (i AppArray) ToAppArrayOutput() AppArrayOutput { 635 return i.ToAppArrayOutputWithContext(context.Background()) 636 } 637 638 func (i AppArray) ToAppArrayOutputWithContext(ctx context.Context) AppArrayOutput { 639 return pulumi.ToOutputWithContext(ctx, i).(AppArrayOutput) 640 } 641 642 // AppMapInput is an input type that accepts AppMap and AppMapOutput values. 643 // You can construct a concrete instance of `AppMapInput` via: 644 // 645 // AppMap{ "key": AppArgs{...} } 646 type AppMapInput interface { 647 pulumi.Input 648 649 ToAppMapOutput() AppMapOutput 650 ToAppMapOutputWithContext(context.Context) AppMapOutput 651 } 652 653 type AppMap map[string]AppInput 654 655 func (AppMap) ElementType() reflect.Type { 656 return reflect.TypeOf((*map[string]*App)(nil)).Elem() 657 } 658 659 func (i AppMap) ToAppMapOutput() AppMapOutput { 660 return i.ToAppMapOutputWithContext(context.Background()) 661 } 662 663 func (i AppMap) ToAppMapOutputWithContext(ctx context.Context) AppMapOutput { 664 return pulumi.ToOutputWithContext(ctx, i).(AppMapOutput) 665 } 666 667 type AppOutput struct{ *pulumi.OutputState } 668 669 func (AppOutput) ElementType() reflect.Type { 670 return reflect.TypeOf((**App)(nil)).Elem() 671 } 672 673 func (o AppOutput) ToAppOutput() AppOutput { 674 return o 675 } 676 677 func (o AppOutput) ToAppOutputWithContext(ctx context.Context) AppOutput { 678 return o 679 } 680 681 // Personal access token for a third-party source control system for an Amplify app. This token must have write access to the relevant repo to create a webhook and a read-only deploy key for the Amplify project. The token is not stored, so after applying this attribute can be removed and the setup token deleted. 682 func (o AppOutput) AccessToken() pulumi.StringPtrOutput { 683 return o.ApplyT(func(v *App) pulumi.StringPtrOutput { return v.AccessToken }).(pulumi.StringPtrOutput) 684 } 685 686 // ARN of the Amplify app. 687 func (o AppOutput) Arn() pulumi.StringOutput { 688 return o.ApplyT(func(v *App) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 689 } 690 691 // Automated branch creation configuration for an Amplify app. An `autoBranchCreationConfig` block is documented below. 692 func (o AppOutput) AutoBranchCreationConfig() AppAutoBranchCreationConfigOutput { 693 return o.ApplyT(func(v *App) AppAutoBranchCreationConfigOutput { return v.AutoBranchCreationConfig }).(AppAutoBranchCreationConfigOutput) 694 } 695 696 // Automated branch creation glob patterns for an Amplify app. 697 func (o AppOutput) AutoBranchCreationPatterns() pulumi.StringArrayOutput { 698 return o.ApplyT(func(v *App) pulumi.StringArrayOutput { return v.AutoBranchCreationPatterns }).(pulumi.StringArrayOutput) 699 } 700 701 // Credentials for basic authorization for an Amplify app. 702 func (o AppOutput) BasicAuthCredentials() pulumi.StringPtrOutput { 703 return o.ApplyT(func(v *App) pulumi.StringPtrOutput { return v.BasicAuthCredentials }).(pulumi.StringPtrOutput) 704 } 705 706 // The [build specification](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html) (build spec) for an Amplify app. 707 func (o AppOutput) BuildSpec() pulumi.StringOutput { 708 return o.ApplyT(func(v *App) pulumi.StringOutput { return v.BuildSpec }).(pulumi.StringOutput) 709 } 710 711 // The [custom HTTP headers](https://docs.aws.amazon.com/amplify/latest/userguide/custom-headers.html) for an Amplify app. 712 func (o AppOutput) CustomHeaders() pulumi.StringOutput { 713 return o.ApplyT(func(v *App) pulumi.StringOutput { return v.CustomHeaders }).(pulumi.StringOutput) 714 } 715 716 // Custom rewrite and redirect rules for an Amplify app. A `customRule` block is documented below. 717 func (o AppOutput) CustomRules() AppCustomRuleArrayOutput { 718 return o.ApplyT(func(v *App) AppCustomRuleArrayOutput { return v.CustomRules }).(AppCustomRuleArrayOutput) 719 } 720 721 // Default domain for the Amplify app. 722 func (o AppOutput) DefaultDomain() pulumi.StringOutput { 723 return o.ApplyT(func(v *App) pulumi.StringOutput { return v.DefaultDomain }).(pulumi.StringOutput) 724 } 725 726 // Description for an Amplify app. 727 func (o AppOutput) Description() pulumi.StringPtrOutput { 728 return o.ApplyT(func(v *App) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 729 } 730 731 // Enables automated branch creation for an Amplify app. 732 func (o AppOutput) EnableAutoBranchCreation() pulumi.BoolPtrOutput { 733 return o.ApplyT(func(v *App) pulumi.BoolPtrOutput { return v.EnableAutoBranchCreation }).(pulumi.BoolPtrOutput) 734 } 735 736 // Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. 737 func (o AppOutput) EnableBasicAuth() pulumi.BoolPtrOutput { 738 return o.ApplyT(func(v *App) pulumi.BoolPtrOutput { return v.EnableBasicAuth }).(pulumi.BoolPtrOutput) 739 } 740 741 // Enables auto-building of branches for the Amplify App. 742 func (o AppOutput) EnableBranchAutoBuild() pulumi.BoolPtrOutput { 743 return o.ApplyT(func(v *App) pulumi.BoolPtrOutput { return v.EnableBranchAutoBuild }).(pulumi.BoolPtrOutput) 744 } 745 746 // Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. 747 func (o AppOutput) EnableBranchAutoDeletion() pulumi.BoolPtrOutput { 748 return o.ApplyT(func(v *App) pulumi.BoolPtrOutput { return v.EnableBranchAutoDeletion }).(pulumi.BoolPtrOutput) 749 } 750 751 // Environment variables map for an Amplify app. 752 func (o AppOutput) EnvironmentVariables() pulumi.StringMapOutput { 753 return o.ApplyT(func(v *App) pulumi.StringMapOutput { return v.EnvironmentVariables }).(pulumi.StringMapOutput) 754 } 755 756 // AWS Identity and Access Management (IAM) service role for an Amplify app. 757 func (o AppOutput) IamServiceRoleArn() pulumi.StringPtrOutput { 758 return o.ApplyT(func(v *App) pulumi.StringPtrOutput { return v.IamServiceRoleArn }).(pulumi.StringPtrOutput) 759 } 760 761 // Name for an Amplify app. 762 func (o AppOutput) Name() pulumi.StringOutput { 763 return o.ApplyT(func(v *App) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 764 } 765 766 // OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key. The OAuth token is not stored. 767 func (o AppOutput) OauthToken() pulumi.StringPtrOutput { 768 return o.ApplyT(func(v *App) pulumi.StringPtrOutput { return v.OauthToken }).(pulumi.StringPtrOutput) 769 } 770 771 // Platform or framework for an Amplify app. Valid values: `WEB`, `WEB_COMPUTE`. Default value: `WEB`. 772 func (o AppOutput) Platform() pulumi.StringPtrOutput { 773 return o.ApplyT(func(v *App) pulumi.StringPtrOutput { return v.Platform }).(pulumi.StringPtrOutput) 774 } 775 776 // Describes the information about a production branch for an Amplify app. A `productionBranch` block is documented below. 777 func (o AppOutput) ProductionBranches() AppProductionBranchArrayOutput { 778 return o.ApplyT(func(v *App) AppProductionBranchArrayOutput { return v.ProductionBranches }).(AppProductionBranchArrayOutput) 779 } 780 781 // Repository for an Amplify app. 782 func (o AppOutput) Repository() pulumi.StringPtrOutput { 783 return o.ApplyT(func(v *App) pulumi.StringPtrOutput { return v.Repository }).(pulumi.StringPtrOutput) 784 } 785 786 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 787 func (o AppOutput) Tags() pulumi.StringMapOutput { 788 return o.ApplyT(func(v *App) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 789 } 790 791 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 792 // 793 // Deprecated: Please use `tags` instead. 794 func (o AppOutput) TagsAll() pulumi.StringMapOutput { 795 return o.ApplyT(func(v *App) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 796 } 797 798 type AppArrayOutput struct{ *pulumi.OutputState } 799 800 func (AppArrayOutput) ElementType() reflect.Type { 801 return reflect.TypeOf((*[]*App)(nil)).Elem() 802 } 803 804 func (o AppArrayOutput) ToAppArrayOutput() AppArrayOutput { 805 return o 806 } 807 808 func (o AppArrayOutput) ToAppArrayOutputWithContext(ctx context.Context) AppArrayOutput { 809 return o 810 } 811 812 func (o AppArrayOutput) Index(i pulumi.IntInput) AppOutput { 813 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *App { 814 return vs[0].([]*App)[vs[1].(int)] 815 }).(AppOutput) 816 } 817 818 type AppMapOutput struct{ *pulumi.OutputState } 819 820 func (AppMapOutput) ElementType() reflect.Type { 821 return reflect.TypeOf((*map[string]*App)(nil)).Elem() 822 } 823 824 func (o AppMapOutput) ToAppMapOutput() AppMapOutput { 825 return o 826 } 827 828 func (o AppMapOutput) ToAppMapOutputWithContext(ctx context.Context) AppMapOutput { 829 return o 830 } 831 832 func (o AppMapOutput) MapIndex(k pulumi.StringInput) AppOutput { 833 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *App { 834 return vs[0].(map[string]*App)[vs[1].(string)] 835 }).(AppOutput) 836 } 837 838 func init() { 839 pulumi.RegisterInputType(reflect.TypeOf((*AppInput)(nil)).Elem(), &App{}) 840 pulumi.RegisterInputType(reflect.TypeOf((*AppArrayInput)(nil)).Elem(), AppArray{}) 841 pulumi.RegisterInputType(reflect.TypeOf((*AppMapInput)(nil)).Elem(), AppMap{}) 842 pulumi.RegisterOutputType(AppOutput{}) 843 pulumi.RegisterOutputType(AppArrayOutput{}) 844 pulumi.RegisterOutputType(AppMapOutput{}) 845 }