►
From YouTube: GitLab Terraform Provider Development Talk - Part 1
Description
We talk about how to get started with contributions to the GitLab Terraform Provider using an upcoming guide. This is part 1 and more video will follow where we actually implement and test a new resource.
A
Hold
it
and
all
right
there
we
go
hi
and
welcome
to
the
recording
with
Teemo
and
Hunter,
where
we're
taking
a
look
at
doing
some
gitlab
terraform
provider
resource
there's
an
MR
that
kind
of
has
instructed
for
like
how
to
create
your
your
first
resources
and
we're
kind
of
trying
to
go
through
that
I.
Don't
have
anything
set
up
for
local
development
around
us.
So
that's
where
we're
starting.
B
Sounds
good
well,
so
your
cheat
case
running
did
you?
Did
you
check
yeah.
B
What
we
try
to
do
is
set
up
a
gitlab
instance,
but
we're
like
Hunter
was
doing
some
developments
or
GDK
it's
in
the
middle
of
migrations
and
whatnot,
and
we
are
still
starting
the
the
provider
specific
elab
instance
within
a
Docker
container.
But
this
takes
a
while
on
an
M1
Mac
because
of
emulation
and
stuff.
So
mm-hmm.
A
I'm
going
to
try
when
I
run
into
problems
on
the
front
end
I
found
this
in
a
slack
thread
somewhere
to
run
yarn,
GDK,
restart,
webpack,
GDK,
restart
rails
and
so
I've
got
that
That's,
my
kind
of
go-to
when
I,
when
I
run
into
an
issue
here
so
we'll
give
that
a
oh.
That
was
quick.
B
A
B
A
B
A
Yeah,
it
probably
is,
but
it
looked
like
it
I
think
the
yarn
and
restart
webpack
had
actually
fixed
it.
I,
don't
I.
Think
I
should
probably
next
time
just
try
it
starting
yeah
during
this,
because
it
looked
like
the
page
had.
A
Had
done
its
thing,
okay,
so
yeah
we
can
talk
about
what
we
want
to
get
through
should
I
pull
up
that
Mr.
B
A
Okay,
so
I'm
going
to
start
by
going
to
interior
form
provider
repository
and
it
should
be
an
Mr
on
this
repo
right.
A
Thanks
Patrick
I
think
it's
this
draft.
How.
B
And
it's
still
in
draft,
so
we
are
looking
at
the
work
in
progress
documents
here.
So.
A
Great
so,
while
we're
before
we
dive
into
that,
let
me
see:
did
I
really
just
need
to
click
the
X
on
that
is
that
all
I
needed
to
do
I'm
just
gonna
copy
the
GDK
password
real,
quick
sign
in
and
see
if
we're
able
to
we'll
let
that
run
its
course
so
yeah.
The
draft
document.
A
So,
let's
take
a
look
real,
quick,
okay,
so
there's
no
there's
no
like
a
description
yet
on
here,
but
I
think
that
this
is.
This
is
basically.
B
There's
an
issue
referenced
and
basically
the
goal
of
this
document
is
to
provide
resources
for
how
to
write
your
first
resource
all
right.
This
should
be
a
guide
for
contributors,
Community
contributors,
even
team
members
right
like
someone
who
has
never
contributed
to
the
provider
yeah
and
the
goal
of
the
or
the
trigger
for
this
was
that
we
want
to
increase
the
community
contributions
and
contributions
in
general
to
the
provider
and
having
good
documentation
is
one
way
to
make
it
easier
to
onboard.
A
Yeah
I
think
that's
a
great
concept
and
I'm
a
very
good
candidate
to
test
this
out,
because
I
haven't
made
any
contributions
yet
and
have
a
low
level
of
context.
I'm,
not
a
terraform
expert.
So
this
will
all
be
I,
think
a
good,
a
good
setup
here.
So
all
right,
it
looks
like
we
got.
It
looks
like
we
just
need
to
keep
pressure
yeah.
B
A
Otherwise,
we're
fine,
it
looks
like
everything's
loaded
up
and.
A
B
Yeah
I
suggest
you
go
to
the
Mr
again
and
then,
let's,
let's
open
this
in
the
branch
in
the
source
Branch.
So
if
you
scroll
to
the
top,
there
is
a
link
right
requested
to
merge
blah
blah
blah
right.
Oh
you
wanna
click,
this,
yes
and
then
we
can.
We
can
open
the
markdown
file.
I
guess
this
is
easiest
and
I
think
it's
in
the
docs
folder
and
there's
the
guides
folder.
A
A
This
one
all
right,
I'll
close
the
sidebar
here
I
just
realized
there
was
a
hide
Side
Bar
button.
So
all
right
is
this
a
that's
where
we
want
to
be
okay,
so
we've
got
creating
a
new
resource
using
the
terraform
plugin
framework
and
I'm,
going
to
bump
up
the
font
size
just
a
little
bit,
because
I
forgot
to
bring
my
glasses
down
here
all
right.
This
tutorial
is
meant
to
help
new
contributors
out
when
creating
a
new
resource.
B
Maybe
maybe
a
word
on
that,
so
there
has
been
an
SDK,
it
was
called
terraform,
plugin,
SDK
I,
think,
and
it
was
basically
the
the
way
how
to
implement
the
terraform
provider.
It
takes
care
of
communication
to
terraform
and
you
just
get
Hooks
and
you
need
to
provide
your
schema
for
your
resources.
Okay,
but
since
a
few
months
there
has
been
this
terraform
Pro
provider
framework,
which
is
just
a
new
way
of
writing
your
your
resource.
B
A
Great,
so
this
guide
will
assume
that
development
environment
has
already
been
set
up
by
following
the
developing
the
provider
section:
okay,
so
I
I
kind
of
did
some
of
that.
If
I
go
just
I
want
to
leave
this
tabs
open
I'm
just
going
to
go
to
the
the
main
terraform
provider
again
and
go
to
the
contributing
and
see
real,
quick
I
believe
this
is
what
yeah.
A
Okay,
should
I
go
through
this
now
or
should
I?
No,
no
we're.
B
All
good
okay
did
stuff
in
here
may
matter
later
for,
like
you
know,
there's
some
guidelines,
as
you
can
see
there
at
the
bottom
of
the
page,
which
yeah
give
some
some
guidelines
of
decisions
we'd
make
and
the
I
think
the
the
guide
which
Patrick
wrote
should
actually
already
adhere
to
these
guidelines.
So
if
you
follow
the
guide
and
Implement
stuff
the
same
way
in
your
new
resource,
I
think
you
should
be
good
to
go.
A
I
wonder
if
the
concern
of
Mr
was
more
about
this
local
environment
piece,
because
there's
kind
of
like
almost
this
seems
like
a
best
practices
and
like
stuff
like
up
above
this,
but
I
have
I've
done
this
section.
I've
get
cloned,
yes,
I
seated
into
it.
I
did
the
make
build.
I
also
ran
a
couple
of
commands
that
you
slacked
to
me
that
I
don't
see
on
here
like
the
docker
composed
poll,
to
get
all
the
images
and
then
this
other
command
that's
running
in
the
terminal.
B
A
Okay,
do
we
need
to
do
any
of
the
other?
No,
we
do
not.
Okay,
okay,
gotcha,
so
I
think
for
anyone
following
along,
probably
you
know,
I.
B
There's
like
a
run
against
gitlab
Docker
compose,
so
here
are
the
commands
that
that
you
run
and
are
running
right
now:
okay,
right
yeah
and
we
may
choose
to
run
it
against
GDK,
using
this
option
two
there
where
we
will
run,
make
test
Act
and
then
provide
the
GDK
token
the
base
URL
for
GDK,
and
they
will
run
the
test.
The
acceptance
tests
against
that
instance.
Okay,.
A
Yeah-
and
that
is
one
other
step-
that's
mentioned
in
here-
that
I
did
take.
A
I
went
into
my
email
where,
like
if
the
normal,
onboarding
or
not
normal,
but
the
onboarding
steps
that
were
provided
when
I
was
onboarding,
had
get
lab
license
steps
that
license
is
just
in
my
email,
so
I
created
that
file
in
the
director
in
the
provider
directory
and
added
the
the
license
to
that
text
file.
But
it
will.
A
It
will
yell
at
you,
if
you,
if
you
don't
have
it
it'll
tell
you
to
to
do
it
so
alrighty,
so
I
think
that's
that
seems
cool,
so
that
gets
us
through
here
and
so
now
we're
actually
to
creating
a
new
resource
using
the
terraform
plugin
framework.
A
A
Yeah,
that's
where
we
are
so
step.
One
understand
the
API
from
gitlab,
and
this
says
when
creating
a
new
resource,
the
gitlab
terraform
provider
follows
the
terraform
provider
best
practice
whenever
possible.
This
means
that
a
new
resource
meets
a
couple
of
criteria.
One
resource
aligns
us
closely
to
one
set
of
crud
apis
as
possible.
A
The
attributes
of
the
resource
align
with
the
attributes
of
the
underlying
apis.
For
this
example,
the
resource
gitlab
application
resource,
will
be
used
as
a
step-by-step
example.
This
resource
aligns
to
the
applications
API
as
exposed
by
gitlab
when
creating
a
resource
first
ensure
the
relevant
apis
are
present
in
gitlab.
If
it's
not
clear
whether
an
API
exists
for
a
resource
create
an
issue
Okay
so
use
the
API,
that's
provided,
are
we
talking
when
we
say
cred?
Are
we
talking
the
the
rest
API
specifically
and
not
like
there's
no
graphql
component
to
this?
B
Maturity
I
mean
every
resource
and
data
source,
except
of
One,
is
using
the
rest
API,
and
the
reason
for
this
is
that
terraform
itself
uses
crud
hooks
for
you.
So
in
a
resource
you
implement
a
create
a
an
update,
a
read
and
a
delete.
Okay.
So
even
if
even
that
we
can
use
graphql
in
these
crud
hooks
of
terraform,
we
don't
really
profit
from
graphql,
because
in
terraform
you
usually
want
all
the
attributes
right
anyways.
You
always
want
to
read
all
the
attributes.
There's
no
point
in
from
a
client-side
to
construct
our
own
queries.
B
A
All
right
create
the
resource
struct
in
the
terraform
plugin
framework.
Each
resource
is
represented
by
a
struct
that
implements
one
or
more
interfaces
for
the
sake
of
keeping
this
tutorial
simple,
these
interfaces
won't
be
covered
in
detail,
however,
creating
the
resource
struct
will
be
the
first
step
in
creating
a
new
resource.
Each
resource
is
created
with
its
own.
Go
file
named
like
this.
In
this
case,
resourcegitlab
application.go,
all
right,
so
creating
this
trick
isn't
enough
to
make
sure
the
interfaces
are
met.
So
error
handling
reasons
like
the
top
of
the
we
can.
A
Right
so
so,
as
a
kind
of
like
terraform,
newbie,
I'm,
not
sure,
am
I
supposed
to
go
ahead
and
create
a
new
go
file
here
and
copy
this.
This
contents,
in
is
that
is.
B
B
Okay,
I'm,
not
sure
if
that's
like,
if
we
should
actually
incorporate
this
into
a
tutorial
here
or
maybe
even
provide
like
an
empty
resource
kind
of
things
as
a
doc,
you
know
that
you
can
copy
and
paste
the
entire
thing,
because
if
you
just
copy
and
paste
this
struct
into
a
go
file,
this
doesn't
give
you
anything
right
right.
It's
doesn't
help
so
yeah.
A
B
A
Oh
okay,
yeah!
This
is
also
this
always
serves
me
off.
This
is
just
a
me
thing,
though,
when
it's
code
and
it's
a
link
I,
always
don't
realize
that
it's
actually
a
link,
okay,
which
is
not,
which
is
not
there,
okay,
but
it's,
but
it
should
just
be
in
the
yeah
it
should
be.
It
should
be
there
in
this
repository
in
the
resource.
Application
go
okay!
So
let's
go
back
over
here
and
no
that's
not
really.
What
I
wanted
I
want
to
go
to
the
main.
A
B
All
the
source
code
of
the
resources
they
live
in
the
internal
provider
folder
and
something
special
here,
so
you
can
see
that
there
is
an
SDK
folder,
you
don't
need
to
open
it,
but
there's
an
SDK
folder
and
if
you
scroll
down,
you
also
see
resources
in
here
or
go
files
right
and
the
SD
I
told
you
in
the
beginning
that
there
has
been
this
terraform
plugin
SDK,
which
was
the
way
to
implement
resources.
And
now
there
is
this
plug-in
framework,
which
is
what
we
use
nowadays,
and
these
resources
are
here
in
the
internal
providers.
A
A
B
A
That
something
that
will
that
will
be
in
these
resources
here,
SDK
package,
yeah.
B
You
see
package
SDK
so
yeah,
for
example,
from
the
test
package
shouldn't
use
the
SDK
package
or
from
the
like
the
the
top
level
resources
you
shouldn't
use
any
helper
functions
from
the
SDK.
Okay.
B
A
B
You
scroll
down,
we
can
quickly
check
if
the
struct
is
there,
that
we
were
that
you
know
the
tutorial
wrote
about
and
we
have
it
there
on
line
40,
something
yeah
this
and
and
yeah.
This
is
the
main
like
type
we
have
for
the
resource,
and
then
you
see
on
line
63
how
there
is
a
couple
of
functions
being
implemented
for
that
type.
So
we
have
a
schema
which
yeah,
which
gives
us
a
schema
and
the
schema
means
it
defines
which
attributes
are
available
for
this
resource.
B
So
if
you
scroll
down,
you
see
there
how
there's
like
an
attributes,
map
kind
of
thing
and
now
there's
an
ID
there's
some
name.
So
these
are
all
attributes
you
can
set
on
this
resource.
A
I
see
it's
all
part
of
the
same
function.
Yes,.
B
B
Or
also
this
one,
it
doesn't
matter
yeah
here
you
see.
Their
first
argument
is
a
context
yeah.
So
that's
always
the
first,
the
first
argument
and
then
you
get
a
request
which
is
like
the
input
for
whatever
the
hook
is
in
this.
For
this
like
it
wants,
it
wants
to
create
a
schema,
and
the
response
here
is
where
you
assign
stuff
it's
like
you
assign
a
new
schema
in
the
response
and
for
the
create
hook.
B
You
would
assign
State
there,
for
example,
but
we
will
see
we'll
see
that
later,
but
if
you
now
scroll
down
we'll
we'll
see
the
other
hooks
like
the
there
is
a
configure
here
which
we
can
get
to
later.
That's
not
too
important
right
now.
It
always
looks
the
same,
but
there's
the
create,
for
example,
on
line
100,
yeah,
okay
and
you
see
the
same
kind
of
structure
of
the
arguments
here
for
the
hook
right.
B
And
in
this
case,
in
the
request,
you
basically
get
the
plan.
That's
like
the
terraform
plan
you
get
in
the
request
and
then
the
response
you
set
errors,
you
set
the
state
and
so
on
right
everything
that
results.
The
output
is
in
the
response
and
the
request
is
what's
getting
in,
and
here
you
also
see
the
the
beginning
of
the
crud
thingy
right.
You
have
to
create
right
and
if
you
scroll
down
you,
you
will
see
a
read.
B
A
B
Output,
which,
for
this
resource,
for
example,
doesn't
make
any
sense
because
there
is
resources
which,
from
a
gitlab
API
perspective,
you
cannot
update,
they
need
to
be
recreated.
So
basically,
what
an
update
is
then
like,
if,
as
a
user,
if
you
change
an
attribute,
you
still
want
to
update
right
and
what
it
does.
It
just
does
a
delete
and
then
a
create,
so
it
recreates
the
the
resource
right.
That.
A
B
To
I
mean
the
user,
the
user
will
see
in
the
plan
that
it
is
in
fact
delete
and
create.
So
there
you'll
be
they'll,
be
yeah
not
notified
about
this
yeah.
A
I
think
that
seems
like
that
would
be
expected
in
a
terraform
context
that
you
would
be
just
blowing
everything
away
and
starting
over
okay
and
delete
cool,
and
then
we've
got
some
import,
State
apply
application
model
or
sorry
application
model
to
stay.
B
Cool
yeah,
so
I
think
the
first
or
it
would
be
nice
if
we
go
through
the
tutorial
that
we
know
what
we
are
actually
want
to
implement
right,
that
we
look
for
an
issue
that
contains
a
request
for
a
new
resource,
and
then
we
take
that
as
an
example
and
basically
walk
our
way
through
implementing
that
using
the
guy.
What
do
you
think
that
sounds
good
Okay,
so
yeah?
We
can
go
and
open
the
issues
in
that
in
that
repo.
A
All
right,
so
we
want
the
issues
in
your
telephone
provider.
B
Yes,
and
also
good
to
know
here
is
that
for
the
feature
label,
we
we
defined
some
additional
ones
in
here
in
that
repo.
So
there's
a
feature,
colon
colon
new
resource,
which
you
can
filter
for.
A
Resource
yeah,
exactly
all
right,
let's
give
it
a
whirl.
Yes,.
B
B
For
the
sake
of
this,
what
we
want
to
achieve
and
the
thing
is,
we
not
only
depend
on
the
gitlab
API,
but
we
also
depend
on
a
go
library
to
talk
to
the
gitlab
API,
which
is
called
go
gitlab,
and
this
needs
to
implement
that
as
well.
Right.
A
B
There
is
quite
quite
a
discussion
I
think
in
here
regarding
how
to
achieve
that.
But
if
you
scroll
to
the
bottom
I
think
I,
we
came
to
the
conclusion:
what
to
do.
B
There
was
one
more
comment
right
at
the
very,
very
bottom,
my
friend,
okay,
no,
then
I
think
you
can
scroll
up
to
my
actual
proposal.
Yeah.
B
A
B
A
B
This
is
this
is
Tara
from
code
here,
and
you
see
the
First
Resource.
There
is
the
gitlab
project
issue
which
doesn't
really
matter,
but
then,
if
you
scroll
down
in
here,
you
will
eventually
see
now
at
the
very
bottom.
You
see
a
gitlab
issue
link
and
that
thing.
B
Yeah,
it's
it's.
The
example
is
a
little
more
complex
here,
because
there's
a
four
each
in
there.
You
see
that
for
each
yeah,
which
is
basically
telling
that
you
should
create
once
per
item
there,
one
of
these
resources-
and
it
basically
is
a
way
to
just
like
the
resource
in
a
simple
example,
which
is
half
a
project
and
an
issue
attribute,
and
it
would
have
a
Target
project
and
a
Target
issue,
and
what
that
means
is
it
links
the
project?
B
The
issue
to
the
Target
issue
right
and
the
issue
is
identified
via
project
and
an
issue
ID.
Does
it
make
sense,
yeah
and
like
that
was
one
proposal
what
to
do
and
the
second
one
was
that
we'd
have
one
resource
called
gitlab
project
issue
links,
so
it's
kind
of
plural.
A
B
The
problem
of
the
one
with
the
plural
is
that
the
entity
in
the
API
is
an
issue
link
and
it's
not
an
issue
links,
and
we
want
to.
We
sign
these
principles
that
we
want
to
reflect
the
API
resources
in
terraform
right,
and
this
is
like
one
thing,
and
the
other
thing
is
that
if
we
do
this
with
the
link
links
list,
then
this
will
mean
that
in
terraform
we
want
to
manage
all
the
links,
because
otherwise
like
what,
if
I
create
another
link
outside
of
terraform.
A
B
B
B
A
B
Something
but
let's
do
this
right
because
it's
what
we
usually
do
when
we
develop
in
the
provider,
we
usually
interjected
the
API
right.
A
Yeah
I
think
that
you
know,
given
that
we
have
about
ten
seven
to
ten
minutes
left
or
so
I
think
it
would
make
a
lot
of
sense
to
me
as
the
person
kind
of
understanding
this
stuff
for
the
first
time
to
go.
Take
a
look
at
that
API
and
then
stop
this
video
and
this
kind
of
be
like
the
first
video
and
what
could
possibly
be
like
a
two-part
or
three-part
thing
and
then
the
next
one.
It
could
focus
on
the
actual
development.
B
A
B
Let's
do
like
yeah,
let's
find
the
API
real
quick,
and
for
that
you
can.
You
can
usually
just
Google
gitlab
issues,
links
API
and
that
will
get
you
to
documentation.
B
B
That
what
we
want
yeah
this
is
okay,
because
the
API,
if
it's
like
you,
know
most
of
the
apis,
they
have
a
list
endpoint
the
direct
apis
right.
You
call
links
and
then
there
is
a
get
API
for
this,
which
is
like
links,
slash
issue,
link,
ID
and
then
there
is
a
create
on
the
links
and
then
there's
a
delete
and
an
update
right.
B
We
don't
we
don't
actually
need
to
list,
that's
the
only
one
we
don't
need,
because,
because
we
don't
want
to
know
all
the
issue
links
we
just
want
to
our
resource
will
manage
a
single
issue
link,
and
this
starts
by
creating
initial
link.
Reading
the
issue
link
and
deleting
the
issue
link,
there
is
no
update
of
the
issue.
Do.
B
So
that's
basically
what
we
would
call
in
the
create
hook
all
right
and
we
would
provide
it
the
ID
and
issue
ID
so
that
the
the
first
two
attributes
here
in
the
table
they
are
in
the
URL
right.
If
you
see
the
post
URL
in
the
snippet
above
the
table,
there's
like
above
above
the
table
not
below
I,
don't
know.
I'm.
B
B
A
Okay,
cool
yeah,
so.
A
Lot
of
sense
so
and
and
I
think
just
like
for
me
tying
it
back
to
that
when
we
had
looked
more
closely
at
the
the
go
code
and
the
hooks
and
like
the
create
hook
is
where
we'll
also
be
bringing
in
some
of
this.
So
we'll
need
it
in
the
okay
yeah.
It
makes
sense.
B
And
like
one
more
thing
to
quickly
look
at
is
to
go,
get
lab
Library.
So
let's,
let's
do
this?
Can
you
open
a
new
tab?
I
will
and
then
it's
github.com
it
the
com,
slash
and
then
X,
a
n
c
y
set.
Sorry,
not
C!
A
Let's
type
the
word
minus
all
right,
that's
it.
B
So
that's
our
dependency,
we
need,
and
then
on
this
page
you
can
just
search
for
issue
links.
There
is
go
files
which
are
usually
matching
to
the
API.
B
It's
I
think
it's
issue
links
yes,
so
there's
there's
this
go
file
and
if
you
open
it
and
scroll
down
you
will
you
will
find
the
the
API
endpoints
to
call
if
it's
supported.
So
here
we
have
the
the
list
issue,
relations,
there's
the
get
issue,
link,
there's,
probably
a
get
create
issue
link,
so
here
create
issue
link.
So
this
is
this
is
what
we
need
right
this.
B
A
Right,
but
when
I'm
here,
when
I
go
back
to
here,
I
just
wanted
to
quickly
go
quickly.
Go
to
sorry.
My
dogs
are
given
a
hard
time
out.
B
A
All
right,
let's
see
I,
wanted
to
go
back
to
the
what's.
It
called
the
application
yeah.
Just
the
repo
real,
quick
and
I
wanted
to
look
at
some
of
that.
There's
just
like
my
brain
wants
to
confirm
something.
Let
me
go
back
in
here
and
then
we
have
these
top
level
things
these
go
files.
We
looked
at
test
application,
go
and
I'm,
seeing
that
in
here
we
were
defining
like
a
schema,
but
we
were
also
defining
the
hooks.
B
We
are
basically
constructing
the
API
parameters
and
then
on
line
165
I
mean
we're
actually
calling
in
the
API
using
go
gitlab.
So
this
is
go,
get
lab
here.
That
line
it
calls
into
go,
get
lab,
and
here
basically
we
would
do
like
create
issue
link
instead.
But
then
all
these
things
around
is
like
reading
out
the
attributes
from
terraform
and
then
after
the
API
call
is
like
writing
all
everything
into
State
and
these
kind
of
things.