sharedvpc

package
v1.6.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HcpSharedVpcValidator = attrvalidators.NewObjectValidator("Shared VPC attribute must include all attributes",
	func(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse) {
		if req.ConfigValue.IsNull() || req.ConfigValue.IsUnknown() {
			return
		}

		sharedVpc := SharedVpc{}
		d := req.ConfigValue.As(ctx, &sharedVpc, basetypes.ObjectAsOptions{})
		if d.HasError() {

			return
		}
		errSum := "Invalid shared_vpc attribute assignment"

		valuesToCheck := []basetypes.StringValue{
			sharedVpc.IngressPrivateHostedZoneId,
			sharedVpc.InternalCommunicationPrivateHostedZoneId,
			sharedVpc.Route53RoleArn,
			sharedVpc.VpceRoleArn,
		}
		for _, value := range valuesToCheck {
			if common.IsStringAttributeKnownAndEmpty(value) {
				resp.Diagnostics.AddError(errSum, "Invalid configuration, all attributes are required")
				return
			}
		}
	})

Functions

func HcpStsDatasource

func HcpStsDatasource() map[string]dsschema.Attribute

func SharedVpcResource

func SharedVpcResource() map[string]schema.Attribute

Types

type SharedVpc

type SharedVpc struct {
	IngressPrivateHostedZoneId               types.String `tfsdk:"ingress_private_hosted_zone_id"`
	InternalCommunicationPrivateHostedZoneId types.String `tfsdk:"internal_communication_private_hosted_zone_id"`
	Route53RoleArn                           types.String `tfsdk:"route53_role_arn"`
	VpceRoleArn                              types.String `tfsdk:"vpce_role_arn"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL