github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/route53/resolverFirewallRuleGroupAssociation.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 route53 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a Route 53 Resolver DNS Firewall rule group association resource. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // example, err := route53.NewResolverFirewallRuleGroup(ctx, "example", &route53.ResolverFirewallRuleGroupArgs{ 33 // Name: pulumi.String("example"), 34 // }) 35 // if err != nil { 36 // return err 37 // } 38 // _, err = route53.NewResolverFirewallRuleGroupAssociation(ctx, "example", &route53.ResolverFirewallRuleGroupAssociationArgs{ 39 // Name: pulumi.String("example"), 40 // FirewallRuleGroupId: example.ID(), 41 // Priority: pulumi.Int(100), 42 // VpcId: pulumi.Any(exampleAwsVpc.Id), 43 // }) 44 // if err != nil { 45 // return err 46 // } 47 // return nil 48 // }) 49 // } 50 // 51 // ``` 52 // <!--End PulumiCodeChooser --> 53 // 54 // ## Import 55 // 56 // Using `pulumi import`, import Route 53 Resolver DNS Firewall rule group associations using the Route 53 Resolver DNS Firewall rule group association ID. For example: 57 // 58 // ```sh 59 // $ pulumi import aws:route53/resolverFirewallRuleGroupAssociation:ResolverFirewallRuleGroupAssociation example rslvr-frgassoc-0123456789abcdef 60 // ``` 61 type ResolverFirewallRuleGroupAssociation struct { 62 pulumi.CustomResourceState 63 64 // The ARN (Amazon Resource Name) of the firewall rule group association. 65 Arn pulumi.StringOutput `pulumi:"arn"` 66 // The unique identifier of the firewall rule group. 67 FirewallRuleGroupId pulumi.StringOutput `pulumi:"firewallRuleGroupId"` 68 // If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections. Valid values: `ENABLED`, `DISABLED`. 69 MutationProtection pulumi.StringOutput `pulumi:"mutationProtection"` 70 // A name that lets you identify the rule group association, to manage and use it. 71 Name pulumi.StringOutput `pulumi:"name"` 72 // The setting that determines the processing order of the rule group among the rule groups that you associate with the specified VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting. 73 Priority pulumi.IntOutput `pulumi:"priority"` 74 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 75 Tags pulumi.StringMapOutput `pulumi:"tags"` 76 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 77 // 78 // Deprecated: Please use `tags` instead. 79 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 80 // The unique identifier of the VPC that you want to associate with the rule group. 81 VpcId pulumi.StringOutput `pulumi:"vpcId"` 82 } 83 84 // NewResolverFirewallRuleGroupAssociation registers a new resource with the given unique name, arguments, and options. 85 func NewResolverFirewallRuleGroupAssociation(ctx *pulumi.Context, 86 name string, args *ResolverFirewallRuleGroupAssociationArgs, opts ...pulumi.ResourceOption) (*ResolverFirewallRuleGroupAssociation, error) { 87 if args == nil { 88 return nil, errors.New("missing one or more required arguments") 89 } 90 91 if args.FirewallRuleGroupId == nil { 92 return nil, errors.New("invalid value for required argument 'FirewallRuleGroupId'") 93 } 94 if args.Priority == nil { 95 return nil, errors.New("invalid value for required argument 'Priority'") 96 } 97 if args.VpcId == nil { 98 return nil, errors.New("invalid value for required argument 'VpcId'") 99 } 100 opts = internal.PkgResourceDefaultOpts(opts) 101 var resource ResolverFirewallRuleGroupAssociation 102 err := ctx.RegisterResource("aws:route53/resolverFirewallRuleGroupAssociation:ResolverFirewallRuleGroupAssociation", name, args, &resource, opts...) 103 if err != nil { 104 return nil, err 105 } 106 return &resource, nil 107 } 108 109 // GetResolverFirewallRuleGroupAssociation gets an existing ResolverFirewallRuleGroupAssociation resource's state with the given name, ID, and optional 110 // state properties that are used to uniquely qualify the lookup (nil if not required). 111 func GetResolverFirewallRuleGroupAssociation(ctx *pulumi.Context, 112 name string, id pulumi.IDInput, state *ResolverFirewallRuleGroupAssociationState, opts ...pulumi.ResourceOption) (*ResolverFirewallRuleGroupAssociation, error) { 113 var resource ResolverFirewallRuleGroupAssociation 114 err := ctx.ReadResource("aws:route53/resolverFirewallRuleGroupAssociation:ResolverFirewallRuleGroupAssociation", name, id, state, &resource, opts...) 115 if err != nil { 116 return nil, err 117 } 118 return &resource, nil 119 } 120 121 // Input properties used for looking up and filtering ResolverFirewallRuleGroupAssociation resources. 122 type resolverFirewallRuleGroupAssociationState struct { 123 // The ARN (Amazon Resource Name) of the firewall rule group association. 124 Arn *string `pulumi:"arn"` 125 // The unique identifier of the firewall rule group. 126 FirewallRuleGroupId *string `pulumi:"firewallRuleGroupId"` 127 // If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections. Valid values: `ENABLED`, `DISABLED`. 128 MutationProtection *string `pulumi:"mutationProtection"` 129 // A name that lets you identify the rule group association, to manage and use it. 130 Name *string `pulumi:"name"` 131 // The setting that determines the processing order of the rule group among the rule groups that you associate with the specified VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting. 132 Priority *int `pulumi:"priority"` 133 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 134 Tags map[string]string `pulumi:"tags"` 135 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 136 // 137 // Deprecated: Please use `tags` instead. 138 TagsAll map[string]string `pulumi:"tagsAll"` 139 // The unique identifier of the VPC that you want to associate with the rule group. 140 VpcId *string `pulumi:"vpcId"` 141 } 142 143 type ResolverFirewallRuleGroupAssociationState struct { 144 // The ARN (Amazon Resource Name) of the firewall rule group association. 145 Arn pulumi.StringPtrInput 146 // The unique identifier of the firewall rule group. 147 FirewallRuleGroupId pulumi.StringPtrInput 148 // If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections. Valid values: `ENABLED`, `DISABLED`. 149 MutationProtection pulumi.StringPtrInput 150 // A name that lets you identify the rule group association, to manage and use it. 151 Name pulumi.StringPtrInput 152 // The setting that determines the processing order of the rule group among the rule groups that you associate with the specified VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting. 153 Priority pulumi.IntPtrInput 154 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 155 Tags pulumi.StringMapInput 156 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 157 // 158 // Deprecated: Please use `tags` instead. 159 TagsAll pulumi.StringMapInput 160 // The unique identifier of the VPC that you want to associate with the rule group. 161 VpcId pulumi.StringPtrInput 162 } 163 164 func (ResolverFirewallRuleGroupAssociationState) ElementType() reflect.Type { 165 return reflect.TypeOf((*resolverFirewallRuleGroupAssociationState)(nil)).Elem() 166 } 167 168 type resolverFirewallRuleGroupAssociationArgs struct { 169 // The unique identifier of the firewall rule group. 170 FirewallRuleGroupId string `pulumi:"firewallRuleGroupId"` 171 // If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections. Valid values: `ENABLED`, `DISABLED`. 172 MutationProtection *string `pulumi:"mutationProtection"` 173 // A name that lets you identify the rule group association, to manage and use it. 174 Name *string `pulumi:"name"` 175 // The setting that determines the processing order of the rule group among the rule groups that you associate with the specified VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting. 176 Priority int `pulumi:"priority"` 177 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 178 Tags map[string]string `pulumi:"tags"` 179 // The unique identifier of the VPC that you want to associate with the rule group. 180 VpcId string `pulumi:"vpcId"` 181 } 182 183 // The set of arguments for constructing a ResolverFirewallRuleGroupAssociation resource. 184 type ResolverFirewallRuleGroupAssociationArgs struct { 185 // The unique identifier of the firewall rule group. 186 FirewallRuleGroupId pulumi.StringInput 187 // If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections. Valid values: `ENABLED`, `DISABLED`. 188 MutationProtection pulumi.StringPtrInput 189 // A name that lets you identify the rule group association, to manage and use it. 190 Name pulumi.StringPtrInput 191 // The setting that determines the processing order of the rule group among the rule groups that you associate with the specified VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting. 192 Priority pulumi.IntInput 193 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 194 Tags pulumi.StringMapInput 195 // The unique identifier of the VPC that you want to associate with the rule group. 196 VpcId pulumi.StringInput 197 } 198 199 func (ResolverFirewallRuleGroupAssociationArgs) ElementType() reflect.Type { 200 return reflect.TypeOf((*resolverFirewallRuleGroupAssociationArgs)(nil)).Elem() 201 } 202 203 type ResolverFirewallRuleGroupAssociationInput interface { 204 pulumi.Input 205 206 ToResolverFirewallRuleGroupAssociationOutput() ResolverFirewallRuleGroupAssociationOutput 207 ToResolverFirewallRuleGroupAssociationOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupAssociationOutput 208 } 209 210 func (*ResolverFirewallRuleGroupAssociation) ElementType() reflect.Type { 211 return reflect.TypeOf((**ResolverFirewallRuleGroupAssociation)(nil)).Elem() 212 } 213 214 func (i *ResolverFirewallRuleGroupAssociation) ToResolverFirewallRuleGroupAssociationOutput() ResolverFirewallRuleGroupAssociationOutput { 215 return i.ToResolverFirewallRuleGroupAssociationOutputWithContext(context.Background()) 216 } 217 218 func (i *ResolverFirewallRuleGroupAssociation) ToResolverFirewallRuleGroupAssociationOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupAssociationOutput { 219 return pulumi.ToOutputWithContext(ctx, i).(ResolverFirewallRuleGroupAssociationOutput) 220 } 221 222 // ResolverFirewallRuleGroupAssociationArrayInput is an input type that accepts ResolverFirewallRuleGroupAssociationArray and ResolverFirewallRuleGroupAssociationArrayOutput values. 223 // You can construct a concrete instance of `ResolverFirewallRuleGroupAssociationArrayInput` via: 224 // 225 // ResolverFirewallRuleGroupAssociationArray{ ResolverFirewallRuleGroupAssociationArgs{...} } 226 type ResolverFirewallRuleGroupAssociationArrayInput interface { 227 pulumi.Input 228 229 ToResolverFirewallRuleGroupAssociationArrayOutput() ResolverFirewallRuleGroupAssociationArrayOutput 230 ToResolverFirewallRuleGroupAssociationArrayOutputWithContext(context.Context) ResolverFirewallRuleGroupAssociationArrayOutput 231 } 232 233 type ResolverFirewallRuleGroupAssociationArray []ResolverFirewallRuleGroupAssociationInput 234 235 func (ResolverFirewallRuleGroupAssociationArray) ElementType() reflect.Type { 236 return reflect.TypeOf((*[]*ResolverFirewallRuleGroupAssociation)(nil)).Elem() 237 } 238 239 func (i ResolverFirewallRuleGroupAssociationArray) ToResolverFirewallRuleGroupAssociationArrayOutput() ResolverFirewallRuleGroupAssociationArrayOutput { 240 return i.ToResolverFirewallRuleGroupAssociationArrayOutputWithContext(context.Background()) 241 } 242 243 func (i ResolverFirewallRuleGroupAssociationArray) ToResolverFirewallRuleGroupAssociationArrayOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupAssociationArrayOutput { 244 return pulumi.ToOutputWithContext(ctx, i).(ResolverFirewallRuleGroupAssociationArrayOutput) 245 } 246 247 // ResolverFirewallRuleGroupAssociationMapInput is an input type that accepts ResolverFirewallRuleGroupAssociationMap and ResolverFirewallRuleGroupAssociationMapOutput values. 248 // You can construct a concrete instance of `ResolverFirewallRuleGroupAssociationMapInput` via: 249 // 250 // ResolverFirewallRuleGroupAssociationMap{ "key": ResolverFirewallRuleGroupAssociationArgs{...} } 251 type ResolverFirewallRuleGroupAssociationMapInput interface { 252 pulumi.Input 253 254 ToResolverFirewallRuleGroupAssociationMapOutput() ResolverFirewallRuleGroupAssociationMapOutput 255 ToResolverFirewallRuleGroupAssociationMapOutputWithContext(context.Context) ResolverFirewallRuleGroupAssociationMapOutput 256 } 257 258 type ResolverFirewallRuleGroupAssociationMap map[string]ResolverFirewallRuleGroupAssociationInput 259 260 func (ResolverFirewallRuleGroupAssociationMap) ElementType() reflect.Type { 261 return reflect.TypeOf((*map[string]*ResolverFirewallRuleGroupAssociation)(nil)).Elem() 262 } 263 264 func (i ResolverFirewallRuleGroupAssociationMap) ToResolverFirewallRuleGroupAssociationMapOutput() ResolverFirewallRuleGroupAssociationMapOutput { 265 return i.ToResolverFirewallRuleGroupAssociationMapOutputWithContext(context.Background()) 266 } 267 268 func (i ResolverFirewallRuleGroupAssociationMap) ToResolverFirewallRuleGroupAssociationMapOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupAssociationMapOutput { 269 return pulumi.ToOutputWithContext(ctx, i).(ResolverFirewallRuleGroupAssociationMapOutput) 270 } 271 272 type ResolverFirewallRuleGroupAssociationOutput struct{ *pulumi.OutputState } 273 274 func (ResolverFirewallRuleGroupAssociationOutput) ElementType() reflect.Type { 275 return reflect.TypeOf((**ResolverFirewallRuleGroupAssociation)(nil)).Elem() 276 } 277 278 func (o ResolverFirewallRuleGroupAssociationOutput) ToResolverFirewallRuleGroupAssociationOutput() ResolverFirewallRuleGroupAssociationOutput { 279 return o 280 } 281 282 func (o ResolverFirewallRuleGroupAssociationOutput) ToResolverFirewallRuleGroupAssociationOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupAssociationOutput { 283 return o 284 } 285 286 // The ARN (Amazon Resource Name) of the firewall rule group association. 287 func (o ResolverFirewallRuleGroupAssociationOutput) Arn() pulumi.StringOutput { 288 return o.ApplyT(func(v *ResolverFirewallRuleGroupAssociation) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 289 } 290 291 // The unique identifier of the firewall rule group. 292 func (o ResolverFirewallRuleGroupAssociationOutput) FirewallRuleGroupId() pulumi.StringOutput { 293 return o.ApplyT(func(v *ResolverFirewallRuleGroupAssociation) pulumi.StringOutput { return v.FirewallRuleGroupId }).(pulumi.StringOutput) 294 } 295 296 // If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections. Valid values: `ENABLED`, `DISABLED`. 297 func (o ResolverFirewallRuleGroupAssociationOutput) MutationProtection() pulumi.StringOutput { 298 return o.ApplyT(func(v *ResolverFirewallRuleGroupAssociation) pulumi.StringOutput { return v.MutationProtection }).(pulumi.StringOutput) 299 } 300 301 // A name that lets you identify the rule group association, to manage and use it. 302 func (o ResolverFirewallRuleGroupAssociationOutput) Name() pulumi.StringOutput { 303 return o.ApplyT(func(v *ResolverFirewallRuleGroupAssociation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 304 } 305 306 // The setting that determines the processing order of the rule group among the rule groups that you associate with the specified VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting. 307 func (o ResolverFirewallRuleGroupAssociationOutput) Priority() pulumi.IntOutput { 308 return o.ApplyT(func(v *ResolverFirewallRuleGroupAssociation) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) 309 } 310 311 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 312 func (o ResolverFirewallRuleGroupAssociationOutput) Tags() pulumi.StringMapOutput { 313 return o.ApplyT(func(v *ResolverFirewallRuleGroupAssociation) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 314 } 315 316 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 317 // 318 // Deprecated: Please use `tags` instead. 319 func (o ResolverFirewallRuleGroupAssociationOutput) TagsAll() pulumi.StringMapOutput { 320 return o.ApplyT(func(v *ResolverFirewallRuleGroupAssociation) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 321 } 322 323 // The unique identifier of the VPC that you want to associate with the rule group. 324 func (o ResolverFirewallRuleGroupAssociationOutput) VpcId() pulumi.StringOutput { 325 return o.ApplyT(func(v *ResolverFirewallRuleGroupAssociation) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput) 326 } 327 328 type ResolverFirewallRuleGroupAssociationArrayOutput struct{ *pulumi.OutputState } 329 330 func (ResolverFirewallRuleGroupAssociationArrayOutput) ElementType() reflect.Type { 331 return reflect.TypeOf((*[]*ResolverFirewallRuleGroupAssociation)(nil)).Elem() 332 } 333 334 func (o ResolverFirewallRuleGroupAssociationArrayOutput) ToResolverFirewallRuleGroupAssociationArrayOutput() ResolverFirewallRuleGroupAssociationArrayOutput { 335 return o 336 } 337 338 func (o ResolverFirewallRuleGroupAssociationArrayOutput) ToResolverFirewallRuleGroupAssociationArrayOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupAssociationArrayOutput { 339 return o 340 } 341 342 func (o ResolverFirewallRuleGroupAssociationArrayOutput) Index(i pulumi.IntInput) ResolverFirewallRuleGroupAssociationOutput { 343 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResolverFirewallRuleGroupAssociation { 344 return vs[0].([]*ResolverFirewallRuleGroupAssociation)[vs[1].(int)] 345 }).(ResolverFirewallRuleGroupAssociationOutput) 346 } 347 348 type ResolverFirewallRuleGroupAssociationMapOutput struct{ *pulumi.OutputState } 349 350 func (ResolverFirewallRuleGroupAssociationMapOutput) ElementType() reflect.Type { 351 return reflect.TypeOf((*map[string]*ResolverFirewallRuleGroupAssociation)(nil)).Elem() 352 } 353 354 func (o ResolverFirewallRuleGroupAssociationMapOutput) ToResolverFirewallRuleGroupAssociationMapOutput() ResolverFirewallRuleGroupAssociationMapOutput { 355 return o 356 } 357 358 func (o ResolverFirewallRuleGroupAssociationMapOutput) ToResolverFirewallRuleGroupAssociationMapOutputWithContext(ctx context.Context) ResolverFirewallRuleGroupAssociationMapOutput { 359 return o 360 } 361 362 func (o ResolverFirewallRuleGroupAssociationMapOutput) MapIndex(k pulumi.StringInput) ResolverFirewallRuleGroupAssociationOutput { 363 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResolverFirewallRuleGroupAssociation { 364 return vs[0].(map[string]*ResolverFirewallRuleGroupAssociation)[vs[1].(string)] 365 }).(ResolverFirewallRuleGroupAssociationOutput) 366 } 367 368 func init() { 369 pulumi.RegisterInputType(reflect.TypeOf((*ResolverFirewallRuleGroupAssociationInput)(nil)).Elem(), &ResolverFirewallRuleGroupAssociation{}) 370 pulumi.RegisterInputType(reflect.TypeOf((*ResolverFirewallRuleGroupAssociationArrayInput)(nil)).Elem(), ResolverFirewallRuleGroupAssociationArray{}) 371 pulumi.RegisterInputType(reflect.TypeOf((*ResolverFirewallRuleGroupAssociationMapInput)(nil)).Elem(), ResolverFirewallRuleGroupAssociationMap{}) 372 pulumi.RegisterOutputType(ResolverFirewallRuleGroupAssociationOutput{}) 373 pulumi.RegisterOutputType(ResolverFirewallRuleGroupAssociationArrayOutput{}) 374 pulumi.RegisterOutputType(ResolverFirewallRuleGroupAssociationMapOutput{}) 375 }