-
Notifications
You must be signed in to change notification settings - Fork 51
/
domainMapping.go
138 lines (125 loc) · 6.57 KB
/
domainMapping.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// nolint: lll
package appengine
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// A domain serving an App Engine application.
//
//
// To get more information about DomainMapping, see:
//
// * [API documentation](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.domainMappings)
// * How-to Guides
// * [Official Documentation](https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains)
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-google/blob/master/website/docs/r/app_engine_domain_mapping.html.markdown.
type DomainMapping struct {
pulumi.CustomResourceState
// Relative name of the domain serving the application. Example: example.com.
DomainName pulumi.StringOutput `pulumi:"domainName"`
// Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.
Name pulumi.StringOutput `pulumi:"name"`
// Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.
OverrideStrategy pulumi.StringPtrOutput `pulumi:"overrideStrategy"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// The resource records required to configure this domain mapping. These records must be added to the domain's DNS
// configuration in order to serve the application via this domain mapping.
ResourceRecords DomainMappingResourceRecordArrayOutput `pulumi:"resourceRecords"`
// SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.
SslSettings DomainMappingSslSettingsPtrOutput `pulumi:"sslSettings"`
}
// NewDomainMapping registers a new resource with the given unique name, arguments, and options.
func NewDomainMapping(ctx *pulumi.Context,
name string, args *DomainMappingArgs, opts ...pulumi.ResourceOption) (*DomainMapping, error) {
if args == nil || args.DomainName == nil {
return nil, errors.New("missing required argument 'DomainName'")
}
if args == nil {
args = &DomainMappingArgs{}
}
var resource DomainMapping
err := ctx.RegisterResource("gcp:appengine/domainMapping:DomainMapping", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDomainMapping gets an existing DomainMapping resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDomainMapping(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DomainMappingState, opts ...pulumi.ResourceOption) (*DomainMapping, error) {
var resource DomainMapping
err := ctx.ReadResource("gcp:appengine/domainMapping:DomainMapping", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DomainMapping resources.
type domainMappingState struct {
// Relative name of the domain serving the application. Example: example.com.
DomainName *string `pulumi:"domainName"`
// Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.
Name *string `pulumi:"name"`
// Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.
OverrideStrategy *string `pulumi:"overrideStrategy"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// The resource records required to configure this domain mapping. These records must be added to the domain's DNS
// configuration in order to serve the application via this domain mapping.
ResourceRecords []DomainMappingResourceRecord `pulumi:"resourceRecords"`
// SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.
SslSettings *DomainMappingSslSettings `pulumi:"sslSettings"`
}
type DomainMappingState struct {
// Relative name of the domain serving the application. Example: example.com.
DomainName pulumi.StringPtrInput
// Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.
Name pulumi.StringPtrInput
// Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.
OverrideStrategy pulumi.StringPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// The resource records required to configure this domain mapping. These records must be added to the domain's DNS
// configuration in order to serve the application via this domain mapping.
ResourceRecords DomainMappingResourceRecordArrayInput
// SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.
SslSettings DomainMappingSslSettingsPtrInput
}
func (DomainMappingState) ElementType() reflect.Type {
return reflect.TypeOf((*domainMappingState)(nil)).Elem()
}
type domainMappingArgs struct {
// Relative name of the domain serving the application. Example: example.com.
DomainName string `pulumi:"domainName"`
// Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.
OverrideStrategy *string `pulumi:"overrideStrategy"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.
SslSettings *DomainMappingSslSettings `pulumi:"sslSettings"`
}
// The set of arguments for constructing a DomainMapping resource.
type DomainMappingArgs struct {
// Relative name of the domain serving the application. Example: example.com.
DomainName pulumi.StringInput
// Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.
OverrideStrategy pulumi.StringPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.
SslSettings DomainMappingSslSettingsPtrInput
}
func (DomainMappingArgs) ElementType() reflect.Type {
return reflect.TypeOf((*domainMappingArgs)(nil)).Elem()
}